0021_structured_delta_column.py
python
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
6 days ago
| 1 | """Add structured_delta column to musehub_commits. |
| 2 | |
| 3 | structured_delta was stored in the dropped commit_meta JSON blob. This migration |
| 4 | adds it as a dedicated nullable JSONB column so the symbol indexer can read it |
| 5 | back without losing fidelity on historical commits. New pushes write it directly; |
| 6 | historical rows remain NULL and fall back to snapshot diffing. |
| 7 | |
| 8 | Revision ID: 0021 |
| 9 | Revises: 0020 |
| 10 | """ |
| 11 | from __future__ import annotations |
| 12 | |
| 13 | from alembic import op |
| 14 | import sqlalchemy as sa |
| 15 | from sqlalchemy.dialects.postgresql import JSONB |
| 16 | |
| 17 | revision = "0021" |
| 18 | down_revision = "0020" |
| 19 | branch_labels = None |
| 20 | depends_on = None |
| 21 | |
| 22 | |
| 23 | def upgrade() -> None: |
| 24 | op.add_column( |
| 25 | "musehub_commits", |
| 26 | sa.Column("structured_delta", JSONB(), nullable=True), |
| 27 | ) |
| 28 | |
| 29 | |
| 30 | def downgrade() -> None: |
| 31 | from sqlalchemy import text |
| 32 | op.execute(text("ALTER TABLE musehub_commits DROP COLUMN IF EXISTS structured_delta")) |
File History
3 commits
sha256:8e05daa29ba6702b4a2380a16d690ba31cc099d69c5c859bc6e6f16a0e945f99
Merge 'fix/deploy-memory-limits-and-log-group' into 'dev' —…
Human
6 days ago
sha256:3fadb0439bba9451b89229676971c0d4a40900dec7810e9d5f8791b8d950d505
fix: install.sh version from latest published tarball, not …
Sonnet 4.6
minor
⚠
98 days ago
sha256:763eb2cb8675073b84c19345b27586d2ed939a9aee97c5479b69f502f1a70eff
fix(tests): update test suite to match current implementation
Sonnet 4.6
patch
119 days ago