From 2a689f5c073ccfbe4e7666cf0c8d0cd30e703da0 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 17 Jun 2016 10:48:00 +0200 Subject: [PATCH] Fix style in migrations. --- .../1232daf66ac_add_user_support.py | 22 +++++++++---------- ...44929e0f5f_improve_operation_scheduling.py | 6 ++--- accountant/migrations/script.py.mako | 8 +++---- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/accountant/migrations/1232daf66ac_add_user_support.py b/accountant/migrations/1232daf66ac_add_user_support.py index bbc6bbb..259ac8d 100644 --- a/accountant/migrations/1232daf66ac_add_user_support.py +++ b/accountant/migrations/1232daf66ac_add_user_support.py @@ -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 ### diff --git a/accountant/migrations/144929e0f5f_improve_operation_scheduling.py b/accountant/migrations/144929e0f5f_improve_operation_scheduling.py index 5012b8e..baeb912 100644 --- a/accountant/migrations/144929e0f5f_improve_operation_scheduling.py +++ b/accountant/migrations/144929e0f5f_improve_operation_scheduling.py @@ -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 ) diff --git a/accountant/migrations/script.py.mako b/accountant/migrations/script.py.mako index 43c0940..6b5db70 100644 --- a/accountant/migrations/script.py.mako +++ b/accountant/migrations/script.py.mako @@ -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