15 lines
444 B
SQL
15 lines
444 B
SQL
/*
|
|
Warnings:
|
|
|
|
- Made the column `userId` on table `Note` required. This step will fail if there are existing NULL values in that column.
|
|
|
|
*/
|
|
-- DropForeignKey
|
|
ALTER TABLE "Note" DROP CONSTRAINT "Note_userId_fkey";
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "Note" ALTER COLUMN "userId" SET NOT NULL;
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "Note" ADD CONSTRAINT "Note_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|