Fix indentation in star migration.
This commit is contained in:
parent
aa4903c3cd
commit
08d84298e2
1 changed files with 18 additions and 22 deletions
|
@ -15,7 +15,6 @@ import sqlalchemy as sa
|
||||||
from sqlalchemy.dialects import mysql
|
from sqlalchemy.dialects import mysql
|
||||||
|
|
||||||
def upgrade(tables):
|
def upgrade(tables):
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
|
||||||
op.create_table('star',
|
op.create_table('star',
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||||
|
@ -28,15 +27,12 @@ def upgrade(tables):
|
||||||
op.create_index('star_repository_id', 'star', ['repository_id'], unique=False)
|
op.create_index('star_repository_id', 'star', ['repository_id'], unique=False)
|
||||||
op.create_index('star_user_id', 'star', ['user_id'], unique=False)
|
op.create_index('star_user_id', 'star', ['user_id'], unique=False)
|
||||||
op.create_index('star_user_id_repository_id', 'star', ['user_id', 'repository_id'], unique=True)
|
op.create_index('star_user_id_repository_id', 'star', ['user_id', 'repository_id'], unique=True)
|
||||||
### end Alembic commands ###
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade(tables):
|
def downgrade(tables):
|
||||||
### commands auto generated by Alembic - please adjust! ###
|
|
||||||
op.drop_constraint('fk_star_repository_id_repository', 'star', type_='foreignkey')
|
op.drop_constraint('fk_star_repository_id_repository', 'star', type_='foreignkey')
|
||||||
op.drop_constraint('fk_star_user_id_user', 'star', type_='foreignkey')
|
op.drop_constraint('fk_star_user_id_user', 'star', type_='foreignkey')
|
||||||
op.drop_index('star_user_id_repository_id', table_name='star')
|
op.drop_index('star_user_id_repository_id', table_name='star')
|
||||||
op.drop_index('star_user_id', table_name='star')
|
op.drop_index('star_user_id', table_name='star')
|
||||||
op.drop_index('star_repository_id', table_name='star')
|
op.drop_index('star_repository_id', table_name='star')
|
||||||
op.drop_table('star')
|
op.drop_table('star')
|
||||||
### end Alembic commands ###
|
|
||||||
|
|
Reference in a new issue