/*
  Warnings:

  - Made the column `category_id` on table `documents` required. This step will fail if there are existing NULL values in that column.

*/
-- DropForeignKey
ALTER TABLE `documents` DROP FOREIGN KEY `documents_category_id_fkey`;

-- AlterTable
ALTER TABLE `documents` MODIFY `category_id` VARCHAR(191) NOT NULL;

-- AddForeignKey
ALTER TABLE `documents` ADD CONSTRAINT `documents_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `document_categories`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
