-
Notifications
You must be signed in to change notification settings - Fork 84
Support for check constraints #92
Comments
@jonleighton seems reasonable thing to want. Do you have specific thoughts about syntax and functionality? Off the top of my head it would look like
where
and of course the schema dumper should dump constraints using the above syntax. This all seems straightforward to implement. Just a matter of coding it up :) It would follow the same pattern as foreign keys: define an object to store the check definition, column option handler, schema statements, etc. plus adapter-specific code for the queries. (Hmm, almost calls out for some meta-programming to support that pattern....) and of course specs to test it all. Unfortunately I don't have the time to jump into it right now. Maybe you or somebody else out there in github-land? |
@ronen your proposal sounds good to me. unfortunately I probably won't be able to find time to implement it in the near future though, sorry. I will try to rabble rouse of twitter, perhaps somebody will be interested in working on it. if you'd prefer not to keep open feature requests on GH then feel free to close this, I won't be offended :) |
@jonleighton ok, hopefully somebody will pick it up. i don't mind keeping this open, i'll just label it as a feature request. |
I'm not volunteering to do this (at least not yet), but I'll happily put it to use if someone does implement it! |
I'd love to see support for check constraints in schema_plus.
Thanks
The text was updated successfully, but these errors were encountered: