From 81e41e39abf6c74e01ca6270d9a57edb5d1a6292 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 5 Apr 2026 22:12:47 -0700 Subject: [PATCH] fix: remove duplicate first_seen_at ALTER TABLE in migration 004 001_init.sql already defines first_seen_at in the CREATE TABLE statement. On fresh installs, migration 004 failed with 'duplicate column name: first_seen_at'. Remove the redundant ALTER TABLE; last_seen_at/times_seen/price_at_first_seen are still added by 004 as before. --- app/db/migrations/004_staging_tracking.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/db/migrations/004_staging_tracking.sql b/app/db/migrations/004_staging_tracking.sql index 7ee4225..8090203 100644 --- a/app/db/migrations/004_staging_tracking.sql +++ b/app/db/migrations/004_staging_tracking.sql @@ -1,7 +1,7 @@ -- Staging DB: persistent listing tracking across searches. -- Adds temporal metadata to listings so we can detect stale/repriced/recurring items. -ALTER TABLE listings ADD COLUMN first_seen_at TEXT; +-- first_seen_at already defined in 001_init.sql CREATE TABLE; skip to avoid duplicate column error on fresh installs ALTER TABLE listings ADD COLUMN last_seen_at TEXT; ALTER TABLE listings ADD COLUMN times_seen INTEGER NOT NULL DEFAULT 1; ALTER TABLE listings ADD COLUMN price_at_first_seen REAL;