-
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
Wrong order for table drop #50
Comments
Hmm, the order shouldn't matter because the constraint is dropped before
the table. Did it not drop the constraint first?
Thanks for reporting!
…On Mon, Aug 3, 2020, 5:57 PM antoyo ***@***.***> wrote:
Hi.
It seems the order of tables with relations is wrong.
For instance, it's trying to do:
DROP TABLE "payer";
DROP TABLE "transaction";
for the following models:
class Payer(BaseModel):
pass
class Transaction(BaseModel):
payer = ForeignKeyField(Payer, backref="transactions")
(which were deleted from the code)
Actually, it seems random, because a subsequent run was in the right order:
DROP TABLE "transaction";
DROP TABLE "payer";
So, I guess the tool does not check for relations in the database tables.
Thanks to fix this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPUNANGF2DU6KHGWDGQTRTR65MIZANCNFSM4PT3XJMQ>
.
|
It does not seem so:
So, here's a reproducer for this bug:
First create the tables by running this script. Then, comment the classes Here's my output:
(Sorry, the output is in French and I don't know how to make it in english as |
Any news about this? |
Hi.
It seems the order of tables with relations is wrong.
For instance, it's trying to do:
for the following models:
(which were deleted from the code)
Actually, it seems random, because a subsequent run was in the right order:
So, I guess the tool does not check for relations in the database tables.
Thanks to fix this.
The text was updated successfully, but these errors were encountered: