Merge pull request #194 from Hestia-Homes/feature/postcode_search_has_updated_at

add last updated script to db
This commit is contained in:
Jun-te Kim 2026-03-06 15:54:26 +00:00 committed by GitHub
commit 198e2c075e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5708 additions and 0 deletions

View file

@ -0,0 +1,4 @@
ALTER TABLE "postcode_search" ADD COLUMN "last_updated_at" timestamp;--> statement-breakpoint
UPDATE "postcode_search" SET "last_updated_at" = "created_at";--> statement-breakpoint
ALTER TABLE "postcode_search" ALTER COLUMN "last_updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "postcode_search" ALTER COLUMN "last_updated_at" SET NOT NULL;

File diff suppressed because it is too large Load diff

View file

@ -1086,6 +1086,13 @@
"when": 1772194536121,
"tag": "0154_workable_stingray",
"breakpoints": true
},
{
"idx": 155,
"version": "7",
"when": 1772637615885,
"tag": "0155_calm_hydra",
"breakpoints": true
}
]
}

View file

@ -32,4 +32,5 @@ export const postcodeSearch = pgTable("postcode_search", {
// Timestamp for when the entry was first created
createdAt: timestamp("created_at").defaultNow().notNull(),
lastUpdatedAt: timestamp("last_updated_at").defaultNow().notNull(),
});