cal.pub0.org/prisma/migrations/20210825004801_schedule_schema/migration.sql

20 lines
554 B
SQL

-- AlterTable
ALTER TABLE "users" ADD COLUMN "completedOnboarding" BOOLEAN DEFAULT false;
-- CreateTable
CREATE TABLE "Schedule" (
"id" SERIAL NOT NULL,
"userId" INTEGER,
"eventTypeId" INTEGER,
"title" TEXT,
"freeBusyTimes" JSONB,
PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "Schedule" ADD FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Schedule" ADD FOREIGN KEY ("eventTypeId") REFERENCES "EventType"("id") ON DELETE SET NULL ON UPDATE CASCADE;