add references, chart improvement, fix scrollable combobox, fixed funnels

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-07 20:23:34 +01:00
parent 6a6ccfdb42
commit 6d5bfa4cbe
21 changed files with 454 additions and 114 deletions

View File

@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "references" (
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
"title" TEXT NOT NULL,
"description" TEXT,
"project_id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "references_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "references" ADD CONSTRAINT "references_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "references" ADD COLUMN "date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

View File

@@ -25,6 +25,7 @@ model Project {
dashboards Dashboard[]
share ShareOverview?
EventMeta EventMeta[]
Reference Reference[]
@@map("projects")
}
@@ -184,3 +185,17 @@ model EventMeta {
@@unique([name, project_id])
@@map("event_meta")
}
model Reference {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
title String
description String?
date DateTime @default(now())
project_id String
project Project @relation(fields: [project_id], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
@@map("references")
}