Fix style in migrations.

This commit is contained in:
Alexis Lahouze 2016-06-17 10:48:00 +02:00
parent 5fa806f29b
commit 2a689f5c07
3 changed files with 17 additions and 19 deletions

View File

@ -7,28 +7,26 @@ Create Date: 2015-08-31 10:24:40.578432
"""
# revision identifiers, used by Alembic.
revision = '1232daf66ac'
down_revision = '144929e0f5f'
revision = '1232daf66ac' # flake8: noqa
down_revision = '144929e0f5f' # flake8: noqa
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('email', sa.String(length=200), nullable=False),
sa.Column('password', sa.String(length=100), nullable=True),
sa.Column('active', sa.Boolean(), server_default=sa.text('true'), nullable=False),
sa.PrimaryKeyConstraint('id')
op.create_table(
'user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('email', sa.String(length=200), nullable=False),
sa.Column('password', sa.String(length=100), nullable=True),
sa.Column('active', sa.Boolean(), server_default=sa.text('true'),
nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=True)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_user_email'), table_name='user')
op.drop_table('user')
### end Alembic commands ###

View File

@ -7,8 +7,8 @@ Create Date: 2015-07-17 15:04:01.002581
"""
# revision identifiers, used by Alembic.
revision = '144929e0f5f'
down_revision = None
revision = '144929e0f5f' # flake8: noqa
down_revision = None # flake8: noqa
from alembic import op
import sqlalchemy as sa
@ -138,5 +138,5 @@ SELECT NULL::bigint AS id,
true AS canceled
FROM scheduled_operation
JOIN canceled_operation ON canceled_operation.scheduled_operation_id = scheduled_operation.id;
"""
""" # flake8: noqa
)

View File

@ -7,10 +7,10 @@ Create Date: ${create_date}
"""
# revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
revision = ${repr(up_revision)} # flake8: noqa
down_revision = ${repr(down_revision)} # flake8: noqa
branch_labels = ${repr(branch_labels)} # flake8: noqa
depends_on = ${repr(depends_on)} # flake8: noqa
from alembic import op
import sqlalchemy as sa