"""Backfill NULL merge_strategy rows to 'state_overlay'. Every proposal is a merge operation and must have a strategy. NULL means the row was created before the default was enforced. This migration backfills all existing NULL values to the canonical default. Revision ID: 0050 Revises: 0049 """ from __future__ import annotations import sqlalchemy as sa from alembic import op revision: str = "0050" down_revision: str = "0049" branch_labels = None depends_on = None def upgrade() -> None: op.execute( sa.text( "UPDATE musehub_proposals SET merge_strategy = 'state_overlay' " "WHERE merge_strategy IS NULL" ) ) def downgrade() -> None: pass # NULL backfills are not reversible