migrate uprn to big integer

This commit is contained in:
Khalim Conn-Kowlessar 2024-07-10 10:56:34 +01:00
parent 7148eefa8b
commit 3f6c00ce13
5 changed files with 1727 additions and 4 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "solar" ALTER COLUMN "uprn" SET DATA TYPE bigint USING "uprn"::bigint;

File diff suppressed because it is too large Load diff

View file

@ -512,6 +512,13 @@
"when": 1720604604887,
"tag": "0072_plain_vapor",
"breakpoints": true
},
{
"idx": 73,
"version": "5",
"when": 1720605222664,
"tag": "0073_youthful_havok",
"breakpoints": true
}
]
}

View file

@ -1,10 +1,10 @@
import {
bigserial,
text,
timestamp,
pgTable,
real,
jsonb,
bigint,
} from "drizzle-orm/pg-core";
import { InferModel } from "drizzle-orm";
@ -12,7 +12,7 @@ export const Solar = pgTable("solar", {
id: bigserial("id", { mode: "bigint" }).primaryKey(),
longitude: real("longitude").notNull(),
latitude: real("latitude").notNull(),
uprn: text("uprn").notNull(),
uprn: bigint("uprn", { mode: "bigint" }).notNull(),
createdAt: timestamp("created_at", {
precision: 6,
withTimezone: true,

View file

@ -1,8 +1,8 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"target": "es5",
// "target": "ESNext",
// "target": "es5",
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,