fix: add fetch_coins.py to auto-deploy loop + legacy migration comment
Some checks are pending
CI / lint-and-test (push) Waiting to run

- auto-deploy.sh: fetch_coins.py was missing from the root-level .py deploy
  loop (line 72). Only manual deploy.sh had it. Next cycle syncs it to VPS.
- fetch_coins.py: document the ALTER TABLE loop as legacy migration for older
  DBs that predate the CREATE TABLE columns.

Reviewed-by: Ganymede
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
m3taversal 2026-04-20 17:06:35 +01:00
parent eac5d2f0d3
commit a479ab533b
2 changed files with 2 additions and 1 deletions

View file

@ -69,7 +69,7 @@ RSYNC_FLAGS="-az --exclude='__pycache__' --exclude='*.pyc' --exclude='*.bak*'"
rsync $RSYNC_FLAGS lib/ "$PIPELINE_DIR/lib/"
for f in teleo-pipeline.py reweave.py; do
for f in teleo-pipeline.py reweave.py fetch_coins.py; do
[ -f "$f" ] && rsync $RSYNC_FLAGS "$f" "$PIPELINE_DIR/$f"
done

View file

@ -153,6 +153,7 @@ def ensure_schema(conn):
UNIQUE(snapshot_date, name)
)
""")
# Legacy migration — these columns exist in CREATE TABLE but may be missing in older DBs
for col in ("protocol_owned_tokens", "adjusted_circulating_supply", "treasury_protocol_tokens", "vesting_tokens"):
try:
conn.execute(f"ALTER TABLE coin_snapshots ADD COLUMN {col} REAL")