mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
migrations
This commit is contained in:
parent
f18b819992
commit
47a1bbd7ef
7 changed files with 6764 additions and 2 deletions
|
|
@ -31,8 +31,9 @@ export async function POST(request: NextRequest) {
|
|||
secretAccessKey: process.env.PRESIGN_AWS_SECRET_KEY,
|
||||
});
|
||||
|
||||
const { userId, portfolioId, fileKey } = validatedBody;
|
||||
const { fileKey } = validatedBody;
|
||||
|
||||
console.log("Making presigned URL")
|
||||
// Presigned url is valid for 5 minutes
|
||||
const preSignedUrl = await s3.getSignedUrl("putObject", {
|
||||
Bucket: process.env.RETROFIT_PLAN_INPUT_BUCKET_NAME,
|
||||
|
|
@ -40,6 +41,7 @@ export async function POST(request: NextRequest) {
|
|||
ContentType: "text/csv",
|
||||
Expires: 5 * 60,
|
||||
});
|
||||
console.log("preSignedUrl:", preSignedUrl)
|
||||
|
||||
return new NextResponse(JSON.stringify({ url: preSignedUrl }), {
|
||||
status: 200,
|
||||
|
|
|
|||
6
src/app/db/migrations/0114_swift_unicorn.sql
Normal file
6
src/app/db/migrations/0114_swift_unicorn.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE "funding_package_measures" ALTER COLUMN "measure" SET DATA TYPE text;--> statement-breakpoint
|
||||
ALTER TABLE "material" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
|
||||
DROP TYPE "public"."type";--> statement-breakpoint
|
||||
CREATE TYPE "public"."type" AS ENUM('suspended_floor_insulation', 'solid_floor_insulation', 'external_wall_insulation', 'internal_wall_insulation', 'cavity_wall_insulation', 'mechanical_ventilation', 'loft_insulation', 'exposed_floor_insulation', 'flat_roof_insulation', 'room_roof_insulation', 'cavity_wall_extraction', 'iwi_wall_demolition', 'iwi_vapour_barrier', 'iwi_redecoration', 'suspended_floor_demolition', 'suspended_floor_redecoration', 'suspended_floor_vapour_barrier', 'solid_floor_demolition', 'solid_floor_preparation', 'solid_floor_vapour_barrier', 'solid_floor_redecoration', 'ewi_wall_demolition', 'ewi_wall_preparation', 'ewi_wall_redecoration', 'low_energy_lighting_installation', 'flat_roof_preparation', 'flat_roof_vapour_barrier', 'flat_roof_waterproofing', 'windows_glazing', 'trickle_vent', 'door_undercut', 'solar_pv', 'solar_battery', 'scaffolding', 'high_heat_retention_storage_heaters', 'air_source_heat_pump', 'sealing_open_fireplace');--> statement-breakpoint
|
||||
ALTER TABLE "funding_package_measures" ALTER COLUMN "measure" SET DATA TYPE "public"."type" USING "measure"::"public"."type";--> statement-breakpoint
|
||||
ALTER TABLE "material" ALTER COLUMN "type" SET DATA TYPE "public"."type" USING "type"::"public"."type";
|
||||
6
src/app/db/migrations/0115_skinny_makkari.sql
Normal file
6
src/app/db/migrations/0115_skinny_makkari.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE "funding_package_measures" ALTER COLUMN "measure" SET DATA TYPE text;--> statement-breakpoint
|
||||
ALTER TABLE "material" ALTER COLUMN "type" SET DATA TYPE text;--> statement-breakpoint
|
||||
DROP TYPE "public"."type";--> statement-breakpoint
|
||||
CREATE TYPE "public"."type" AS ENUM('suspended_floor_insulation', 'solid_floor_insulation', 'external_wall_insulation', 'internal_wall_insulation', 'cavity_wall_insulation', 'mechanical_ventilation', 'loft_insulation', 'exposed_floor_insulation', 'flat_roof_insulation', 'room_roof_insulation', 'cavity_wall_extraction', 'iwi_wall_demolition', 'iwi_vapour_barrier', 'iwi_redecoration', 'suspended_floor_demolition', 'suspended_floor_redecoration', 'suspended_floor_vapour_barrier', 'solid_floor_demolition', 'solid_floor_preparation', 'solid_floor_vapour_barrier', 'solid_floor_redecoration', 'ewi_wall_demolition', 'ewi_wall_preparation', 'ewi_wall_redecoration', 'low_energy_lighting_installation', 'flat_roof_preparation', 'flat_roof_vapour_barrier', 'flat_roof_waterproofing', 'windows_glazing', 'trickle_vent', 'door_undercut', 'solar_pv', 'solar_battery', 'scaffolding', 'high_heat_retention_storage_heaters', 'air_source_heat_pump', 'sealing_fireplace');--> statement-breakpoint
|
||||
ALTER TABLE "funding_package_measures" ALTER COLUMN "measure" SET DATA TYPE "public"."type" USING "measure"::"public"."type";--> statement-breakpoint
|
||||
ALTER TABLE "material" ALTER COLUMN "type" SET DATA TYPE "public"."type" USING "type"::"public"."type";
|
||||
3367
src/app/db/migrations/meta/0114_snapshot.json
Normal file
3367
src/app/db/migrations/meta/0114_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
3367
src/app/db/migrations/meta/0115_snapshot.json
Normal file
3367
src/app/db/migrations/meta/0115_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -799,6 +799,20 @@
|
|||
"when": 1755798209029,
|
||||
"tag": "0113_bright_lady_bullseye",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 114,
|
||||
"version": "7",
|
||||
"when": 1755825706741,
|
||||
"tag": "0114_swift_unicorn",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 115,
|
||||
"version": "7",
|
||||
"when": 1755826015743,
|
||||
"tag": "0115_skinny_makkari",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ export const MaterialType: [string, ...string[]] = [
|
|||
"high_heat_retention_storage_heaters",
|
||||
"air_source_heat_pump",
|
||||
// other
|
||||
"sealing_fireplace"
|
||||
"sealing_fireplace",
|
||||
];
|
||||
export const materialTypeEnum = pgEnum("type", MaterialType);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue