mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
adding user new column hide_read_posts migration
This commit is contained in:
parent
08290b0468
commit
77745fdfec
1 changed files with 32 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
||||||
|
"""adding hide_read_posts bool to User
|
||||||
|
|
||||||
|
Revision ID: 6e0b98e1fdc6
|
||||||
|
Revises: 27b71f6cb21e
|
||||||
|
Create Date: 2024-09-27 10:35:19.451448
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '6e0b98e1fdc6'
|
||||||
|
down_revision = '27b71f6cb21e'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||||
|
batch_op.add_column(sa.Column('hide_read_posts', sa.Boolean(), nullable=True))
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||||
|
batch_op.drop_column('hide_read_posts')
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Add table
Reference in a new issue