API - move some app configuration parameters in database

This commit is contained in:
Sam
2019-11-13 18:40:01 +01:00
parent 6447d22d97
commit 649b773ba9
14 changed files with 619 additions and 17 deletions

View File

@ -0,0 +1,36 @@
"""empty message
Revision ID: 8a0aad4c838c
Revises: 1345afe3b11d
Create Date: 2019-11-13 13:14:20.147296
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8a0aad4c838c'
down_revision = '1345afe3b11d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('app_config',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('registration', sa.Boolean(), nullable=False),
sa.Column('max_users', sa.Integer(), nullable=False),
sa.Column('gpx_limit_import', sa.Integer(), nullable=False),
sa.Column('max_single_file_size', sa.Integer(), nullable=False),
sa.Column('max_zip_file_size', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('app_config')
# ### end Alembic commands ###