Ergänze Entwurfsstatus für Termine und Plantafel
This commit is contained in:
8
backend/db/migrations/0034_events_color.sql
Normal file
8
backend/db/migrations/0034_events_color.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
ALTER TABLE "events" ADD COLUMN "color" text;
|
||||
|
||||
UPDATE "events" AS e
|
||||
SET "color" = COALESCE(t."calendarConfig"->'quickEntry'->>'color', '#2563eb')
|
||||
FROM "tenants" AS t
|
||||
WHERE e."tenant" = t."id"
|
||||
AND e."quick" = true
|
||||
AND e."color" IS NULL;
|
||||
5
backend/db/migrations/0038_events_state.sql
Normal file
5
backend/db/migrations/0038_events_state.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE "events" ADD COLUMN "state" text DEFAULT 'Final' NOT NULL;
|
||||
|
||||
UPDATE "events"
|
||||
SET "state" = 'Final'
|
||||
WHERE "state" IS NULL;
|
||||
@@ -243,29 +243,36 @@
|
||||
{
|
||||
"idx": 34,
|
||||
"version": "7",
|
||||
"when": 1777420800000,
|
||||
"tag": "0034_events_color",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 35,
|
||||
"version": "7",
|
||||
"when": 1778191200000,
|
||||
"tag": "0035_contract_history",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 35,
|
||||
"idx": 36,
|
||||
"version": "7",
|
||||
"when": 1778194800000,
|
||||
"tag": "0036_allowed_contracttypes",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 36,
|
||||
"idx": 37,
|
||||
"version": "7",
|
||||
"when": 1778840100000,
|
||||
"tag": "0037_outgoing_sepa_mandates",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 37,
|
||||
"idx": 38,
|
||||
"version": "7",
|
||||
"when": 1778840200000,
|
||||
"tag": "0034_profile_availability_note",
|
||||
"when": 1779158400000,
|
||||
"tag": "0038_events_state",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -32,6 +32,8 @@ export const events = pgTable(
|
||||
|
||||
eventtype: text("eventtype").default("Umsetzung"),
|
||||
quick: boolean("quick").notNull().default(false),
|
||||
state: text("state").notNull().default("Final"),
|
||||
color: text("color"),
|
||||
|
||||
project: bigint("project", { mode: "number" }), // FK follows when projects.ts exists
|
||||
|
||||
|
||||
Reference in New Issue
Block a user