mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Continue work on brewery page, implement like system
This commit is contained in:
16
src/prisma/migrations/20230423163714_/migration.sql
Normal file
16
src/prisma/migrations/20230423163714_/migration.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "BreweryPostLike" (
|
||||
"id" STRING NOT NULL,
|
||||
"breweryPostId" STRING NOT NULL,
|
||||
"likedById" STRING NOT NULL,
|
||||
"createdAt" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMPTZ(3),
|
||||
|
||||
CONSTRAINT "BreweryPostLike_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "BreweryPostLike" ADD CONSTRAINT "BreweryPostLike_breweryPostId_fkey" FOREIGN KEY ("breweryPostId") REFERENCES "BreweryPost"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "BreweryPostLike" ADD CONSTRAINT "BreweryPostLike_likedById_fkey" FOREIGN KEY ("likedById") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user