Add parallel fs changes to migration scripts and cleanup

This commit is contained in:
Patrick Jentsch
2022-10-26 10:34:07 +02:00
parent cbf3abb424
commit 0b656d3cf1
8 changed files with 223 additions and 210 deletions

View File

@@ -17,25 +17,22 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('tokens',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('access_token', sa.String(length=64), nullable=True),
sa.Column('access_expiration', sa.DateTime(), nullable=True),
sa.Column('refresh_token', sa.String(length=64), nullable=True),
sa.Column('refresh_expiration', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_table(
'tokens',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('access_token', sa.String(length=64), nullable=True),
sa.Column('access_expiration', sa.DateTime(), nullable=True),
sa.Column('refresh_token', sa.String(length=64), nullable=True),
sa.Column('refresh_expiration', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_tokens_access_token'), 'tokens', ['access_token'], unique=False)
op.create_index(op.f('ix_tokens_refresh_token'), 'tokens', ['refresh_token'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_tokens_refresh_token'), table_name='tokens')
op.drop_index(op.f('ix_tokens_access_token'), table_name='tokens')
op.drop_table('tokens')
# ### end Alembic commands ###