mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Add compare_type=True to Migrate constructor
This commit is contained in:
parent
13a6ef95c3
commit
644369d1e9
50
web/migrations/versions/9d21b228d353_.py
Normal file
50
web/migrations/versions/9d21b228d353_.py
Normal file
@ -0,0 +1,50 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 9d21b228d353
|
||||
Revises: 33ec4d09b4ca
|
||||
Create Date: 2020-07-15 08:58:59.062442
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '9d21b228d353'
|
||||
down_revision = '33ec4d09b4ca'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('corpus_files', 'author',
|
||||
existing_type=sa.VARCHAR(length=64),
|
||||
type_=sa.String(length=255),
|
||||
existing_nullable=True)
|
||||
op.alter_column('corpus_files', 'title',
|
||||
existing_type=sa.VARCHAR(length=64),
|
||||
type_=sa.String(length=255),
|
||||
existing_nullable=True)
|
||||
op.alter_column('roles', 'permissions',
|
||||
existing_type=sa.INTEGER(),
|
||||
type_=sa.BigInteger(),
|
||||
existing_nullable=True)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column('roles', 'permissions',
|
||||
existing_type=sa.BigInteger(),
|
||||
type_=sa.INTEGER(),
|
||||
existing_nullable=True)
|
||||
op.alter_column('corpus_files', 'title',
|
||||
existing_type=sa.String(length=255),
|
||||
type_=sa.VARCHAR(length=64),
|
||||
existing_nullable=True)
|
||||
op.alter_column('corpus_files', 'author',
|
||||
existing_type=sa.String(length=255),
|
||||
type_=sa.VARCHAR(length=64),
|
||||
existing_nullable=True)
|
||||
# ### end Alembic commands ###
|
@ -8,7 +8,7 @@ from flask_migrate import Migrate, upgrade
|
||||
import os
|
||||
|
||||
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
|
||||
migrate = Migrate(app, db)
|
||||
migrate = Migrate(app, db, compare_type=True)
|
||||
|
||||
|
||||
@app.shell_context_processor
|
||||
|
Loading…
Reference in New Issue
Block a user