I have a table called "session" which has foreign key constraints. I 
removed them and auto generated a migration script. The upgrade function is 
populated as expected but the downgrade function isn't. I searched through 
the available operations but can't find what i need.

The create_foreign_key creates a new table which I don't want. The 
create_unique_constraint and create_check_constraint are also not what I'm 
looking for. I guess alter_table is left but I don't know how to use it. 
Should I fall back to sql alchemy operations?


def upgrade():
    op.drop_constraint('session_server_fkey', 'session', 'foreignkey')
    op.drop_constraint('session_app_fkey', 'session', 'foreignkey')


def downgrade():
    pass

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to