Skip to content
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

Every fields with default value are considered changed. #144

Open
trim21 opened this issue May 17, 2019 · 3 comments
Open

Every fields with default value are considered changed. #144

trim21 opened this issue May 17, 2019 · 3 comments

Comments

@trim21
Copy link

trim21 commented May 17, 2019

I'm not quite sure that is my mistake or its a bug of peewee_migrate.

image

left is my first migration, and i didn't change followed table, but edited another table. Then I generated a migration.

But i found that pw.CharField and pw.InteferField are both consider changed. Seems that all field with default value are considered changed and automatically get a migration.

@trim21
Copy link
Author

trim21 commented May 17, 2019

Found workaround. Manually replace onstraints=[SQL("DEFAULT 0")] with default=0, and the migrate will work as excpted.

@zhjchina
Copy link

I'm not quite sure that is my mistake or its a bug of peewee_migrate.

image

left is my first migration, and i didn't change followed table, but edited another table. Then I generated a migration.

But i found that pw.CharField and pw.InteferField are both consider changed. Seems that all field with default value are considered changed and automatically get a migration.

I encounter the same problem。It is a bug,the default value show not generate "constraints" param,but generate "default" param

@trim21
Copy link
Author

trim21 commented Aug 27, 2019

@zhjchina I try pwiz in peewee package, it has same behavior.

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

No branches or pull requests

2 participants