gabriel / musehub public
0029_rename_metadata_to_commit_metadata.py python
28 lines 719 B
Raw
sha256:a10adeeb7a0169cb9900f9806ed7a973047258abb6283724fe55e8eb68ff3f0a init: musehub initial commit Human 172 days ago
1 from __future__ import annotations
2
3 """Rename muse_commits.metadata → commit_metadata.
4
5 The column was named 'metadata' in the DB but 'commit_metadata' in the ORM
6 to avoid collision with SQLAlchemy's DeclarativeBase.metadata attribute.
7 This migration aligns the DB column name with the Python attribute name,
8 removing the ORM alias.
9
10 Revision ID: 0029
11 Revises: 0028
12 Create Date: 2026-04-07
13 """
14
15 from alembic import op
16
17 revision = "0029"
18 down_revision = "0028"
19 branch_labels = None
20 depends_on = None
21
22
23 def upgrade() -> None:
24 op.alter_column("muse_commits", "metadata", new_column_name="commit_metadata")
25
26
27 def downgrade() -> None:
28 op.alter_column("muse_commits", "commit_metadata", new_column_name="metadata")
File History 1 commit
sha256:a10adeeb7a0169cb9900f9806ed7a973047258abb6283724fe55e8eb68ff3f0a init: musehub initial commit Human 172 days ago