mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
migration to remove related field #371
This commit is contained in:
parent
4ba1b1aa4a
commit
6c59ef8cb8
2 changed files with 32 additions and 1 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
32
migrations/versions/f2fa25ab5e52_remove_home_checkbox.py
Normal file
32
migrations/versions/f2fa25ab5e52_remove_home_checkbox.py
Normal 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 ###
|
Loading…
Add table
Reference in a new issue