mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Merge pull request #194 from Hestia-Homes/feature/postcode_search_has_updated_at
add last updated script to db
This commit is contained in:
commit
198e2c075e
4 changed files with 5708 additions and 0 deletions
4
src/app/db/migrations/0155_calm_hydra.sql
Normal file
4
src/app/db/migrations/0155_calm_hydra.sql
Normal 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;
|
||||
5696
src/app/db/migrations/meta/0155_snapshot.json
Normal file
5696
src/app/db/migrations/meta/0155_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1086,6 +1086,13 @@
|
|||
"when": 1772194536121,
|
||||
"tag": "0154_workable_stingray",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 155,
|
||||
"version": "7",
|
||||
"when": 1772637615885,
|
||||
"tag": "0155_calm_hydra",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue