Files
stats/apps/backend/prisma/migrations/20231010195623_add_client/migration.sql
Carl-Gerhard Lindesvärd 903fd155c3 init
2023-10-11 12:34:35 +02:00

13 lines
403 B
SQL

-- CreateTable
CREATE TABLE "clients" (
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
"name" TEXT NOT NULL,
"secret" TEXT NOT NULL,
"project_id" UUID NOT NULL,
CONSTRAINT "clients_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "clients" ADD CONSTRAINT "clients_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE RESTRICT ON UPDATE CASCADE;