Fix harmonize prod DB targeting and large-hall loading hangs.

Prod env files now win over root .env so harmonize:db can open gallery_prod after gallery_dev; tour_stops gains updated_at; halls no longer block the overlay on every painting texture. Docs cover the fixes and one-artist image pull from prod; Duccio painting assets synced from TrueNAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-07-26 01:26:51 +03:00
co-authored by Cursor
parent f6c73c1792
commit 8e444fa461
115 changed files with 124 additions and 37 deletions
+9
View File
@@ -20,9 +20,13 @@ CREATE TABLE IF NOT EXISTS tour_stops (
painting_id INTEGER NOT NULL REFERENCES paintings(id) ON DELETE CASCADE,
sort_order INTEGER NOT NULL DEFAULT 0,
body TEXT NOT NULL DEFAULT '',
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
UNIQUE (tour_id, painting_id)
);
-- Existing DBs created before updated_at: migrate-sync-timestamps.sql also adds it.
ALTER TABLE tour_stops ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ NOT NULL DEFAULT now();
CREATE INDEX IF NOT EXISTS tour_stops_tour_idx ON tour_stops (tour_id, sort_order);
CREATE INDEX IF NOT EXISTS tour_stops_painting_idx ON tour_stops (painting_id);
@@ -38,3 +42,8 @@ DROP TRIGGER IF EXISTS tours_updated_at ON tours;
CREATE TRIGGER tours_updated_at
BEFORE UPDATE ON tours
FOR EACH ROW EXECUTE PROCEDURE tours_touch_updated_at();
DROP TRIGGER IF EXISTS tour_stops_updated_at ON tour_stops;
CREATE TRIGGER tour_stops_updated_at
BEFORE UPDATE ON tour_stops
FOR EACH ROW EXECUTE PROCEDURE tours_touch_updated_at();