max-telegram-bridge-bot/migrations/sqlite/000016_pairs_created_at.up.sql
Andrey Lugovskoy 49af1b6432 Add created_at to pairs for pair growth stats
Migration 000016. Existing 825 rows keep created_at=0 (we can't
backfill accurately); new /bridge pairs get a real unix timestamp.

SQLite uses INSERT … ON CONFLICT … DO UPDATE SET prefix=0 (previously
INSERT OR REPLACE, which would have wiped created_at on conflict).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 15:40:28 +04:00

1 line
68 B
SQL

ALTER TABLE pairs ADD COLUMN created_at INTEGER NOT NULL DEFAULT 0;