mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
"""trusted instances
|
|
|
|
Revision ID: 1505d32771b7
|
|
Revises: a937c8721612
|
|
Create Date: 2024-02-23 16:26:02.561074
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '1505d32771b7'
|
|
down_revision = 'a937c8721612'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('instance', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('trusted', sa.Boolean(), nullable=True))
|
|
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('receive_message_mode', sa.String(length=20), nullable=True))
|
|
batch_op.add_column(sa.Column('referrer', sa.String(length=256), nullable=True))
|
|
batch_op.drop_column('email_messages_sent')
|
|
batch_op.drop_column('email_messages')
|
|
|
|
# ### 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.add_column(sa.Column('email_messages', sa.BOOLEAN(), autoincrement=False, nullable=True))
|
|
batch_op.add_column(sa.Column('email_messages_sent', sa.BOOLEAN(), autoincrement=False, nullable=True))
|
|
batch_op.drop_column('referrer')
|
|
batch_op.drop_column('receive_message_mode')
|
|
|
|
with op.batch_alter_table('instance', schema=None) as batch_op:
|
|
batch_op.drop_column('trusted')
|
|
|
|
# ### end Alembic commands ###
|