0051_drop_disk_path_from_musehub_objects.py
python
sha256:20b27796ed512236119feef48b4577a8fd9ded05a15267dd4e6da23604ad1f1a
docs: update Suggested Ownership Split table to reflect ful…
Sonnet 5
28 days ago
| 1 | """Drop disk_path column from musehub_objects. |
| 2 | |
| 3 | The column was written during the LocalBackend era and has been empty for all |
| 4 | objects since the BlobBackend migration. storage_uri (s3://…) is the canonical |
| 5 | location reference. |
| 6 | |
| 7 | Revision ID: 0051 |
| 8 | Revises: 0050 |
| 9 | """ |
| 10 | from __future__ import annotations |
| 11 | |
| 12 | import sqlalchemy as sa |
| 13 | from alembic import op |
| 14 | |
| 15 | revision: str = "0051" |
| 16 | down_revision: str = "0050" |
| 17 | branch_labels = None |
| 18 | depends_on = None |
| 19 | |
| 20 | |
| 21 | def upgrade() -> None: |
| 22 | # disk_path was already absent from the consolidated schema (0001); this |
| 23 | # migration is a no-op on fresh DBs and only runs the DROP on instances |
| 24 | # that still carry the column from the pre-consolidation era. |
| 25 | op.execute( |
| 26 | "ALTER TABLE musehub_objects DROP COLUMN IF EXISTS disk_path" |
| 27 | ) |
| 28 | |
| 29 | |
| 30 | def downgrade() -> None: |
| 31 | op.add_column( |
| 32 | "musehub_objects", |
| 33 | sa.Column("disk_path", sa.String(length=2048), nullable=False, server_default=""), |
| 34 | ) |
File History
3 commits
sha256:20b27796ed512236119feef48b4577a8fd9ded05a15267dd4e6da23604ad1f1a
docs: update Suggested Ownership Split table to reflect ful…
Sonnet 5
28 days ago
sha256:8ea2f75226d5834770ccaddbaa6efda1cc337446fd481bb385de8bec4555ae79
docs: Section 9 CI pipeline — confirm job queue is idempote…
Sonnet 5
28 days ago
sha256:80e1a60a39562f6e616aaafbb27487f03abbec7d8ffc6164302b7a0c0bfc63ee
docs: check off Section 0 items verified in inventory doc, …
Sonnet 5
28 days ago