multiple migrations on the materials table

This commit is contained in:
Khalim Conn-Kowlessar 2023-11-23 18:30:49 +00:00
parent 7ad818161c
commit 8304845fe8
8 changed files with 4096 additions and 1 deletions

View file

@ -0,0 +1,13 @@
ALTER TYPE "cost_unit" ADD VALUE 'gbp_per_m2';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'iwi_wall_demolition';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'iwi_vapour_barrier';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'iwi_redecoration';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'suspended_floor_demolition';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'suspended_floor_redecoration';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'solid_floor_demolition';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'solid_floor_preparation';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'solid_floor_vapour_barrier';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'solid_floor_redecoration';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'ewi_wall_demolition';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'ewi_wall_preparation';--> statement-breakpoint
ALTER TYPE "type" ADD VALUE 'ewi_wall_redecoration';

View file

@ -0,0 +1 @@
ALTER TABLE "material" ADD COLUMN "notes" text;

View file

@ -0,0 +1 @@
ALTER TABLE "material" RENAME COLUMN "labour_cost_per_unit" TO "labour_hours_per_unit";

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -344,6 +344,13 @@
"when": 1700758387956,
"tag": "0048_salty_katie_power",
"breakpoints": true
},
{
"idx": 49,
"version": "5",
"when": 1700764223864,
"tag": "0049_bumpy_plazm",
"breakpoints": true
}
]
}

View file

@ -79,7 +79,7 @@ export const material = pgTable("material", {
prime_material_cost: real("prime_material_cost"),
material_cost: real("material_cost"),
labour_cost: real("labour_cost"),
labour_cost_per_unit: real("labour_cost_per_unit"),
labour_hours_per_unit: real("labour_hours_per_unit"),
plant_cost: real("plant_cost"),
total_cost: real("total_cost"),
cost: json("cost").$type<number[]>(),