mirror of
https://github.com/rommapp/romm.git
synced 2026-12-03 02:24:09 +01:00
35 lines
829 B
Python
35 lines
829 B
Python
"""Remove has_cover column from roms table
|
|
|
|
Revision ID: 0011_drop_has_cover
|
|
Revises: 0010_igdb_id_integerr
|
|
Create Date: 2023-09-16 15:28:29.221475
|
|
|
|
"""
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "0011_drop_has_cover"
|
|
down_revision = "0010_igdb_id_integerr"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table("roms", schema=None) as batch_op:
|
|
batch_op.drop_column("has_cover", if_exists=True)
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table("roms", schema=None) as batch_op:
|
|
batch_op.add_column(
|
|
sa.Column(
|
|
"has_cover",
|
|
sa.BOOLEAN(),
|
|
autoincrement=False,
|
|
nullable=True,
|
|
),
|
|
if_not_exists=True,
|
|
)
|