Skip to content
Discussion options

You must be logged in to vote

I would say that in most cases you could assume that.
The only cases that I can think of would be an add table with complex fk/index/etc that can't be added inline requiring multiple operations to create and only a drop table to undo. But I'm not sure autogenerate will generate that or create a single create_table even in this case.

this may not be the only instance though.

I guess add an assert that len(upgrade_ops) == len(downgrade_ops) and see how far you get

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Andrew-Chen-Wang
Comment options

@CaselIT
Comment options

Answer selected by Andrew-Chen-Wang
@Andrew-Chen-Wang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants