mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
"""link sharing monitoring
|
|
|
|
Revision ID: b58c4301d1ad
|
|
Revises: ea5650ac4628
|
|
Create Date: 2023-12-30 08:08:57.954434
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b58c4301d1ad'
|
|
down_revision = 'ea5650ac4628'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('domain', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('notify_mods', sa.Boolean(), nullable=True))
|
|
batch_op.add_column(sa.Column('notify_admins', sa.Boolean(), nullable=True))
|
|
batch_op.create_index(batch_op.f('ix_domain_notify_admins'), ['notify_admins'], unique=False)
|
|
batch_op.create_index(batch_op.f('ix_domain_notify_mods'), ['notify_mods'], unique=False)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('domain', schema=None) as batch_op:
|
|
batch_op.drop_index(batch_op.f('ix_domain_notify_mods'))
|
|
batch_op.drop_index(batch_op.f('ix_domain_notify_admins'))
|
|
batch_op.drop_column('notify_admins')
|
|
batch_op.drop_column('notify_mods')
|
|
|
|
# ### end Alembic commands ###
|