Open spraot opened 5 years ago
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.
I'm not on peewee3, so I don't think so. I ended up just removing the constraints since they weren't necessary anyway.
+1 going to leave open tho
TODO: implement constraints
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.