2022-09-23 19:04:29 +02:00
|
|
|
"""Add fields for external apps
|
|
|
|
|
|
|
|
Revision ID: e08df0bef76f
|
|
|
|
Revises: b514cca2d47b
|
|
|
|
Create Date: 2022-09-23 16:38:06.557307
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = 'e08df0bef76f'
|
|
|
|
down_revision = 'b514cca2d47b'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.add_column('app', sa.Column('external', sa.Boolean(), server_default='0', nullable=False))
|
|
|
|
op.add_column('app', sa.Column('url', sa.String(length=128), nullable=True))
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
2022-10-04 15:45:37 +02:00
|
|
|
# Add monitoring app
|
|
|
|
op.execute(f'INSERT IGNORE INTO app (`name`, `slug`) VALUES ("Monitoring","monitoring")')
|
|
|
|
|
2022-09-23 19:04:29 +02:00
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_column('app', 'url')
|
|
|
|
op.drop_column('app', 'external')
|
|
|
|
# ### end Alembic commands ###
|