-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change sql commands order #36
base: master
Are you sure you want to change the base?
Conversation
If run `peeweedbevolve.evolve` from the scratch, wo any table, there is an error, if other tables have foreign keys, cause of commands order `create table-alter table-create (unique) index` In this PR I've change the order to `create table-create (unique) index-alter table`
can you resubmit w/o the code reformatting? it's impossible to tell what the change is here. |
ye, 1 min |
cool, thanks for the contribution! so you moved two pieces:
the latter:
will definitely break things, as that code in the middle is all done to make changes using the new table name instead of the old. (and likely that's the root cause for those test failures.) the former seems a good idea tho. (i can't think of anything off hand that would have to happen after a FK creation.) is there a test case we could add that would differentiate the behaviors and/or highlight the original error you encountered? |
yes, here is sample of
|
So, no need to move
just FK creation? |
If run
peeweedbevolve.evolve
from the scratch, wo any table, there is an error, if other tables have foreign keys, cause of commands ordercreate table-alter table-create (unique) index
In this PR I've change the order to
create table-create (unique) index-alter table
And some pep8 fixes ;)