communiapp-event-planner/prisma/migrations/20230204173831_init/migration.sql

24 lines
793 B
SQL

-- CreateTable
CREATE TABLE "Event" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"titleFormatted" TEXT NOT NULL,
"locationFormatted" TEXT NOT NULL,
"descriptionDescriptionFormatted" TEXT NOT NULL,
"dateTime" TEXT NOT NULL,
"endDateTime" TEXT NOT NULL,
"isOfficial" BOOLEAN NOT NULL,
"videoUrl" TEXT NOT NULL,
"group" INTEGER NOT NULL,
"createdBy" INTEGER NOT NULL
);
-- CreateTable
CREATE TABLE "EventState" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"publishYoutube" BOOLEAN NOT NULL,
"publishFacebook" BOOLEAN NOT NULL,
"publishInstagram" BOOLEAN NOT NULL,
"eventId" INTEGER NOT NULL,
CONSTRAINT "EventState_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES "Event" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);