mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
working on materials table but commented out for now
This commit is contained in:
parent
fe86f9fe85
commit
27cef9f231
3 changed files with 57 additions and 8 deletions
|
|
@ -3,11 +3,4 @@ import type { Config } from "drizzle-kit";
|
|||
export default {
|
||||
schema: "./src/app/db/schema/*",
|
||||
out: "./src/app/db/migrations",
|
||||
// dbCredentials: {
|
||||
// host: String(process.env.DB_HOST),
|
||||
// port: Number(process.env.DB_PORT),
|
||||
// user: process.env.DB_USERNAME,
|
||||
// password: process.env.DB_PASSWORD,
|
||||
// database: String(process.env.DB_NAME),
|
||||
// },
|
||||
} satisfies Config;
|
||||
|
|
|
|||
|
|
@ -171,4 +171,4 @@
|
|||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
56
src/app/db/schema/materials.ts
Normal file
56
src/app/db/schema/materials.ts
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
// TODO: Materials database should live in a different database
|
||||
|
||||
// import {
|
||||
// bigserial,
|
||||
// text,
|
||||
// timestamp,
|
||||
// pgTable,
|
||||
// real,
|
||||
// pgEnum,
|
||||
// json,
|
||||
// } from "drizzle-orm/pg-core";
|
||||
|
||||
// export const MaterialType: [string, ...string[]] = [
|
||||
// "suspended_floor_insulation",
|
||||
// "solid_floor_insulation",
|
||||
// "external_wall_insulation",
|
||||
// "internal_wall_insulation",
|
||||
// ];
|
||||
// export const materialTypeEnum = pgEnum("type", MaterialType);
|
||||
|
||||
// export const DepthUnit: [string, ...string[]] = ["mm"];
|
||||
// export const depthUnitEnum = pgEnum("depth_unit", DepthUnit);
|
||||
|
||||
// export const CostUnit: [string, ...string[]] = ["gbp_sq_meter"];
|
||||
// export const costUnitEnum = pgEnum("cost_unit", CostUnit);
|
||||
|
||||
// export const RValueUnit: [string, ...string[]] = [
|
||||
// "square_meter_kelvin_per_watt",
|
||||
// ];
|
||||
// export const rValueUnitEnum = pgEnum("r_value_unit", RValueUnit);
|
||||
|
||||
// export const ThermalConductivityUnit: [string, ...string[]] = [
|
||||
// "watt_per_meter_kelvin",
|
||||
// ];
|
||||
// export const thermalConductivityUnitEnum = pgEnum(
|
||||
// "thermal_conductivity_unit",
|
||||
// ThermalConductivityUnit
|
||||
// );
|
||||
|
||||
// export const materials = pgTable("property", {
|
||||
// id: bigserial("id", { mode: "bigint" }).primaryKey(),
|
||||
// type: materialTypeEnum("type").notNull(),
|
||||
// description: text("description").notNull(),
|
||||
// depths: json("json").$type<number[]>(),
|
||||
// depth_unit: depthUnitEnum("depth_unit"),
|
||||
// cost: real("cost"),
|
||||
// costUnit: costUnitEnum("cost_unit"),
|
||||
// rValuePerMm: real("r_value_per_mm"),
|
||||
// rValueUnit: rValueUnitEnum("r_value_unit"),
|
||||
// thermalConductivity: real("thermal_conductivity"),
|
||||
// thermalConductivityUnit: thermalConductivityUnitEnum(
|
||||
// "thermal_conductivity_unit"
|
||||
// ),
|
||||
// link: text("link"),
|
||||
// createdAt: timestamp("created_at").notNull().defaultNow(),
|
||||
// });
|
||||
Loading…
Add table
Reference in a new issue