refactor(dates): condense the two date-contract migrations into one
Neither migration had shipped, so the #115 snapshot columns join the #114 new-contract columns in 2026-09-24-000000_add_true_utc_dates. Pure ADD COLUMN either way — population is runtime (drains), so nothing needs re-migrating. Column order is unchanged, so schema.rs stands.
This commit is contained in:
1 parent
d2263be6ac
commit
7d7d7c713c
4 files changed
+19
-19
No files matched your search
@@ -1,4 +1,4 @@
|
||||
-- True-instant date contract (ADR-0001 / spec #113, ticket #114).
|
||||
-- True-instant date contract (ADR-0001 / spec #113, tickets #114 + #115).
|
||||
--
|
||||
-- image_exif gains the new-contract columns alongside the untouched legacy
|
||||
-- `date_taken`:
|
||||
@@ -10,10 +10,23 @@
|
||||
-- date_taken_tz_source — why the offset is what it is:
|
||||
-- offset_tag | gps | assumed_server | utc_direct
|
||||
-- | manual.
|
||||
-- user_ai_prefs gains the DST-proof display zone (IANA name); the legacy
|
||||
-- tz_offset_minutes column stays frozen for rollback.
|
||||
--
|
||||
-- Manual date edits (ticket #115) write the new-contract triple alongside
|
||||
-- the legacy pair and must be revertible, so image_exif also snapshots the
|
||||
-- pre-override new-contract columns next to the existing legacy snapshot
|
||||
-- pair (original_date_taken / original_date_taken_source):
|
||||
-- original_date_utc / original_camera_offset_minutes /
|
||||
-- original_date_taken_tz_source.
|
||||
--
|
||||
-- All columns are additive and nullable; population happens at runtime
|
||||
-- (ingest + the per-tick backfill drains), so no backfill SQL is needed
|
||||
-- here. user_ai_prefs gains the DST-proof display zone (IANA name); the
|
||||
-- legacy tz_offset_minutes column stays frozen for rollback.
|
||||
|
||||
ALTER TABLE image_exif ADD COLUMN date_utc BIGINT;
|
||||
ALTER TABLE image_exif ADD COLUMN camera_offset_minutes INTEGER;
|
||||
ALTER TABLE image_exif ADD COLUMN date_taken_tz_source TEXT;
|
||||
ALTER TABLE image_exif ADD COLUMN original_date_utc BIGINT;
|
||||
ALTER TABLE image_exif ADD COLUMN original_camera_offset_minutes INTEGER;
|
||||
ALTER TABLE image_exif ADD COLUMN original_date_taken_tz_source TEXT;
|
||||
ALTER TABLE user_ai_prefs ADD COLUMN display_tz TEXT;
|
||||
Reference in new issue
Block a user