mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
47 lines
1.4 KiB
Python
47 lines
1.4 KiB
Python
|
"""bots
|
||
|
|
||
|
Revision ID: 8c5cc19e0670
|
||
|
Revises: b1d3fc38b1f7
|
||
|
Create Date: 2023-10-07 18:13:32.600126
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '8c5cc19e0670'
|
||
|
down_revision = 'b1d3fc38b1f7'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
with op.batch_alter_table('post', schema=None) as batch_op:
|
||
|
batch_op.add_column(sa.Column('from_bot', sa.Boolean(), nullable=True))
|
||
|
|
||
|
with op.batch_alter_table('post_reply', schema=None) as batch_op:
|
||
|
batch_op.add_column(sa.Column('from_bot', sa.Boolean(), nullable=True))
|
||
|
|
||
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
||
|
batch_op.add_column(sa.Column('bot', sa.Boolean(), nullable=True))
|
||
|
batch_op.add_column(sa.Column('ignore_bots', 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('ignore_bots')
|
||
|
batch_op.drop_column('bot')
|
||
|
|
||
|
with op.batch_alter_table('post_reply', schema=None) as batch_op:
|
||
|
batch_op.drop_column('from_bot')
|
||
|
|
||
|
with op.batch_alter_table('post', schema=None) as batch_op:
|
||
|
batch_op.drop_column('from_bot')
|
||
|
|
||
|
# ### end Alembic commands ###
|