migration to remove related field #371

This commit is contained in:
rimu 2024-12-05 13:47:08 +13:00
parent 4ba1b1aa4a
commit 6c59ef8cb8
2 changed files with 32 additions and 1 deletions

View file

@ -456,7 +456,6 @@ class Community(db.Model):
private_mods = db.Column(db.Boolean, default=False) private_mods = db.Column(db.Boolean, default=False)
# Which feeds posts from this community show up in # Which feeds posts from this community show up in
show_home = db.Column(db.Boolean, default=False) # unused
show_popular = db.Column(db.Boolean, default=True) show_popular = db.Column(db.Boolean, default=True)
show_all = db.Column(db.Boolean, default=True) show_all = db.Column(db.Boolean, default=True)

View file

@ -0,0 +1,32 @@
"""remove home checkbox
Revision ID: f2fa25ab5e52
Revises: 98680738ebb0
Create Date: 2024-12-05 13:46:20.291051
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f2fa25ab5e52'
down_revision = '98680738ebb0'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('community', schema=None) as batch_op:
batch_op.drop_column('show_home')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('community', schema=None) as batch_op:
batch_op.add_column(sa.Column('show_home', sa.BOOLEAN(), autoincrement=False, nullable=True))
# ### end Alembic commands ###