First commit

This commit is contained in:
2026-03-16 23:54:36 +01:00 Verified
commit be129af1d9
53 changed files with 49704 additions and 0 deletions
@@ -0,0 +1,40 @@
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"pin" TEXT NOT NULL,
"role" TEXT NOT NULL
);
-- CreateTable
CREATE TABLE "Period" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"startDate" TEXT NOT NULL,
"endDate" TEXT NOT NULL
);
-- CreateTable
CREATE TABLE "Youth" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"team" TEXT NOT NULL,
"periodId" TEXT NOT NULL,
CONSTRAINT "Youth_periodId_fkey" FOREIGN KEY ("periodId") REFERENCES "Period" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Attendance" (
"id" TEXT NOT NULL PRIMARY KEY,
"date" TEXT NOT NULL,
"shiftId" TEXT NOT NULL,
"hoursWorked" REAL NOT NULL,
"weightedHours" REAL NOT NULL,
"status" TEXT NOT NULL,
"note" TEXT,
"youthId" TEXT NOT NULL,
CONSTRAINT "Attendance_youthId_fkey" FOREIGN KEY ("youthId") REFERENCES "Youth" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Attendance_date_youthId_shiftId_key" ON "Attendance"("date", "youthId", "shiftId");
+3
View File
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"