Files
stats/packages/db/prisma/migrations/20231010195623_add_client/migration.sql
Carl-Gerhard Lindesvärd 719a82f1c4 wip: docker
2024-01-14 07:39:02 +01: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;