Refactor year management in the database layer, enhance Year model with budget field, and update UI components for year selection and dashboard display

This commit is contained in:
Norbert Maciaszek
2025-11-25 00:16:21 +01:00
parent 1030991d92
commit f31eb3dc0d
15 changed files with 498 additions and 14 deletions

View File

@@ -0,0 +1,12 @@
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Year" (
"year" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"budget" REAL NOT NULL DEFAULT 3000
);
INSERT INTO "new_Year" ("year") SELECT "year" FROM "Year";
DROP TABLE "Year";
ALTER TABLE "new_Year" RENAME TO "Year";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;

View File

@@ -10,7 +10,8 @@ datasource db {
}
model Year {
year Int @id
year Int @id
budget Float @default(3000)
people Person[]
}