Fix style in migrations.
This commit is contained in:
parent
5fa806f29b
commit
2a689f5c07
@ -7,28 +7,26 @@ Create Date: 2015-08-31 10:24:40.578432
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = '1232daf66ac'
|
revision = '1232daf66ac' # flake8: noqa
|
||||||
down_revision = '144929e0f5f'
|
down_revision = '144929e0f5f' # flake8: noqa
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
op.create_table(
|
||||||
op.create_table('user',
|
'user',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('email', sa.String(length=200), nullable=False),
|
sa.Column('email', sa.String(length=200), nullable=False),
|
||||||
sa.Column('password', sa.String(length=100), nullable=True),
|
sa.Column('password', sa.String(length=100), nullable=True),
|
||||||
sa.Column('active', sa.Boolean(), server_default=sa.text('true'), nullable=False),
|
sa.Column('active', sa.Boolean(), server_default=sa.text('true'),
|
||||||
|
nullable=False),
|
||||||
sa.PrimaryKeyConstraint('id')
|
sa.PrimaryKeyConstraint('id')
|
||||||
)
|
)
|
||||||
op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=True)
|
op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=True)
|
||||||
### end Alembic commands ###
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
|
||||||
op.drop_index(op.f('ix_user_email'), table_name='user')
|
op.drop_index(op.f('ix_user_email'), table_name='user')
|
||||||
op.drop_table('user')
|
op.drop_table('user')
|
||||||
### end Alembic commands ###
|
|
||||||
|
@ -7,8 +7,8 @@ Create Date: 2015-07-17 15:04:01.002581
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = '144929e0f5f'
|
revision = '144929e0f5f' # flake8: noqa
|
||||||
down_revision = None
|
down_revision = None # flake8: noqa
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
@ -138,5 +138,5 @@ SELECT NULL::bigint AS id,
|
|||||||
true AS canceled
|
true AS canceled
|
||||||
FROM scheduled_operation
|
FROM scheduled_operation
|
||||||
JOIN canceled_operation ON canceled_operation.scheduled_operation_id = scheduled_operation.id;
|
JOIN canceled_operation ON canceled_operation.scheduled_operation_id = scheduled_operation.id;
|
||||||
"""
|
""" # flake8: noqa
|
||||||
)
|
)
|
||||||
|
@ -7,10 +7,10 @@ Create Date: ${create_date}
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = ${repr(up_revision)}
|
revision = ${repr(up_revision)} # flake8: noqa
|
||||||
down_revision = ${repr(down_revision)}
|
down_revision = ${repr(down_revision)} # flake8: noqa
|
||||||
branch_labels = ${repr(branch_labels)}
|
branch_labels = ${repr(branch_labels)} # flake8: noqa
|
||||||
depends_on = ${repr(depends_on)}
|
depends_on = ${repr(depends_on)} # flake8: noqa
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
|
Loading…
Reference in New Issue
Block a user