db changes

This commit is contained in:
2025-12-07 17:11:26 +01:00
parent 0f3c8c862f
commit 76e40cd9e1
6 changed files with 27 additions and 27 deletions

View File

@@ -17,7 +17,7 @@ export const vehicles = pgTable("vehicles", {
.primaryKey()
.generatedByDefaultAsIdentity(),
createdAt: timestamp("created_at", { withTimezone: true })
created_at: timestamp("created_at", { withTimezone: true })
.notNull()
.defaultNow(),
@@ -25,7 +25,7 @@ export const vehicles = pgTable("vehicles", {
.notNull()
.references(() => tenants.id),
licensePlate: text("licensePlate"),
license_plate: text("licensePlate"),
name: text("name"),
type: text("type"),
@@ -36,21 +36,21 @@ export const vehicles = pgTable("vehicles", {
vin: text("vin"),
tankSize: doublePrecision("tankSize").notNull().default(0),
tank_size: doublePrecision("tankSize").notNull().default(0),
archived: boolean("archived").notNull().default(false),
buildYear: text("buildYear"),
build_year: text("buildYear"),
towingCapacity: bigint("towingCapacity", { mode: "number" }),
powerInKW: bigint("powerInKW", { mode: "number" }),
towing_capacity: bigint("towingCapacity", { mode: "number" }),
power_in_kw: bigint("powerInKW", { mode: "number" }),
color: text("color"),
profiles: jsonb("profiles").notNull().default([]),
updatedAt: timestamp("updated_at", { withTimezone: true }),
updatedBy: uuid("updated_by").references(() => authUsers.id),
updated_at: timestamp("updated_at", { withTimezone: true }),
updated_by: uuid("updated_by").references(() => authUsers.id),
})
export type Vehicle = typeof vehicles.$inferSelect