Skip to content

Commit

Permalink
Commit migration files
Browse files Browse the repository at this point in the history
  • Loading branch information
mshumayl committed Apr 9, 2023
1 parent 8d8492e commit c992237
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- CreateTable
CREATE TABLE "UserNotes" (
"id" TEXT NOT NULL,
"snippetId" TEXT NOT NULL,
"content" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "UserNotes_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "UserNotes" ADD CONSTRAINT "UserNotes_snippetId_fkey" FOREIGN KEY ("snippetId") REFERENCES "SavedSnippets"("id") ON DELETE CASCADE ON UPDATE CASCADE;

0 comments on commit c992237

Please sign in to comment.