def downgrade ( ) : op . drop_table ( 'transaction' ) if op . _proxy . migration_context . dialect . supports_sequences : op . execute ( DropSequence ( Sequence ( 'transaction_id_seq' ) ) )
restart sequence python sqlalchemy postgres
Downgrade database .
def downgrade():
    """Downgrade database."""
    op.drop_table('transaction')
    if op._proxy.migration_context.dialect.supports_sequences:
        op.execute(DropSequence(Sequence('transaction_id_seq')))