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:
@@ -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;
|
||||
@@ -10,7 +10,8 @@ datasource db {
|
||||
}
|
||||
|
||||
model Year {
|
||||
year Int @id
|
||||
year Int @id
|
||||
budget Float @default(3000)
|
||||
|
||||
people Person[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user