removed default requirements from epc caching db"

This commit is contained in:
Khalim Conn-Kowlessar 2025-11-25 13:38:59 +00:00
parent 40be91f482
commit a583af720b
6 changed files with 9402 additions and 5 deletions

View file

@ -0,0 +1,4 @@
ALTER TABLE "epc_store" ALTER COLUMN "epc_api_created_at" DROP DEFAULT;--> statement-breakpoint
ALTER TABLE "epc_store" ALTER COLUMN "epc_api_created_at" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "epc_store" ALTER COLUMN "epc_page_created_at" DROP DEFAULT;--> statement-breakpoint
ALTER TABLE "epc_store" ALTER COLUMN "epc_page_created_at" DROP NOT NULL;

View file

@ -0,0 +1,3 @@
ALTER TABLE "epc_store" ALTER COLUMN "epc_api" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "epc_store" ALTER COLUMN "epc_page" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "epc_store" ALTER COLUMN "epc_page_rrn" DROP NOT NULL;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -904,6 +904,20 @@
"when": 1764072359053,
"tag": "0128_thin_wiccan",
"breakpoints": true
},
{
"idx": 129,
"version": "7",
"when": 1764077820379,
"tag": "0129_workable_medusa",
"breakpoints": true
},
{
"idx": 130,
"version": "7",
"when": 1764077914945,
"tag": "0130_large_wong",
"breakpoints": true
}
]
}

View file

@ -28,17 +28,17 @@ export const epcStore = pgTable("epc_store", {
uprn: bigint("uprn", { mode: "bigint" }),
// Timestamp for when the EPC API entry was first stored
epcApiCreatedAt: timestamp("epc_api_created_at").defaultNow().notNull(),
epcApiCreatedAt: timestamp("epc_api_created_at"),
// EPC API response for the UPRN
epcApi: jsonb("epc_api").$type<EpcApiResponse>().notNull(),
epcApi: jsonb("epc_api").$type<EpcApiResponse>(),
// Timestamp for when the EPC page was stored
epcPageCreatedAt: timestamp("epc_page_created_at").defaultNow().notNull(),
epcPageCreatedAt: timestamp("epc_page_created_at"),
// HTML content of the EPC page
epcPage: text("epc_page").notNull(),
epcPage: text("epc_page"),
// RRN of the EPC page
epcPageRrn: text("epc_page_rrn").notNull(),
epcPageRrn: text("epc_page_rrn"),
});