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

Does not change constraints #35

Open
spraot opened this issue Apr 12, 2019 · 3 comments
Open

Does not change constraints #35

spraot opened this issue Apr 12, 2019 · 3 comments

Comments

@spraot
Copy link

spraot commented Apr 12, 2019

I changed the constraints in a table so that this column:
check ((hosting)::text = ANY (ARRAY[('Cloud'::character varying)::text, ('Server'::character varying)::text])),
should change to:
check ((hosting)::text = ANY (ARRAY[('Cloud'::character varying)::text, ('Server'::character varying)::text, ('Data Center'::character varying)::text])),

Using the constraints=[Check(...))] syntax in peewee. However, when running the migration, the constraint is not changed.

@keredson
Copy link
Owner

keredson commented May 9, 2019

hey @rachetfoot,

peewee-db-evolve has never had constraint evolution implemented. (i don't recall it existing when i wrote this - was this new to peewee3?) i'd be all for a PR tho - shouldn't be too hard, i assume just a drop and replace call like the indexes, as peewee can obviously gen the appropriate SQL.

@spraot
Copy link
Author

spraot commented May 10, 2019

I'm not on peewee3, so I don't think so. I ended up just removing the constraints since they weren't necessary anyway.

@keredson
Copy link
Owner

+1 going to leave open tho

TODO: implement constraints

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