diff --git a/deploy/auto-deploy.sh b/deploy/auto-deploy.sh index d0f531a..0b0dac7 100755 --- a/deploy/auto-deploy.sh +++ b/deploy/auto-deploy.sh @@ -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 diff --git a/fetch_coins.py b/fetch_coins.py index 8f56516..d07f357 100644 --- a/fetch_coins.py +++ b/fetch_coins.py @@ -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")