mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
38 lines
1 KiB
Python
38 lines
1 KiB
Python
"""themes
|
|
|
|
Revision ID: f19d761c216d
|
|
Revises: 3fb833e34c75
|
|
Create Date: 2024-02-07 16:13:47.846365
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f19d761c216d'
|
|
down_revision = '3fb833e34c75'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('site', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('default_theme', sa.String(length=20), nullable=True))
|
|
|
|
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('theme', sa.String(length=20), 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('theme')
|
|
|
|
with op.batch_alter_table('site', schema=None) as batch_op:
|
|
batch_op.drop_column('default_theme')
|
|
|
|
# ### end Alembic commands ###
|