/* Warnings: - You are about to drop the column `authorId` on the `Document` table. All the data in the column will be lost. - You are about to drop the column `published` on the `Document` table. All the data in the column will be lost. - You are about to drop the `_SharedDocuments` table. If the table is not empty, all the data it contains will be lost. - Added the required column `sharedWithId` to the `Document` table without a default value. This is not possible if the table is not empty. */ -- DropForeignKey ALTER TABLE "Document" DROP CONSTRAINT "Document_authorId_fkey"; -- DropForeignKey ALTER TABLE "_SharedDocuments" DROP CONSTRAINT "_SharedDocuments_A_fkey"; -- DropForeignKey ALTER TABLE "_SharedDocuments" DROP CONSTRAINT "_SharedDocuments_B_fkey"; -- AlterTable ALTER TABLE "Document" DROP COLUMN "authorId", DROP COLUMN "published", ADD COLUMN "sharedWithId" INTEGER NOT NULL; -- DropTable DROP TABLE "_SharedDocuments"; -- AddForeignKey ALTER TABLE "Document" ADD CONSTRAINT "Document_sharedWithId_fkey" FOREIGN KEY ("sharedWithId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;