We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Previous issues #572 #172 Previous discussions #175
Usage:
from piccolo.colums.constraints import UniqueConstraint class FooTable(Table): foo_field = Text() bar_field = Text() my_constraint_1 = UniqueConstraint(['foo_field','bar_field'])
or multiple constraints:
from piccolo.colums.constraints import UniqueConstraint class FooTable(Table): foo_field = Text() bar_field = Text() spam_field = Text() eggs_field = Text() my_constraint_1 = UniqueConstraint(['foo_field','bar_field']) my_constraint_2 = UniqueConstraint(['spam_field','eggs_field'])
Auto migrations are working for:
If You want to update constraint (ex. add new columns to UniqueConstraint()), You should, at first DROP, and then CREATE the new one. Example:
#Comment the line #my_constraint_1 = UniqueConstraint(['foo_field','bar_field']) >> ...migrate... #Uncomment the line my_constraint_1 = UniqueConstraint(['foo_field','spam_field']) >> ...migrate...
In progress:
Some important notes:
Help and fixes are welcome!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Previous issues
#572 #172
Previous discussions
#175
Finally, some result!
New feature: Composite UNIQUE CONSTRAINT
Pull request #582
Usage:
or multiple constraints:
Auto migrations are working for:
If You want to update constraint (ex. add new columns to UniqueConstraint()), You should, at first DROP, and then CREATE the new one. Example:
In progress:
Some important notes:
Help and fixes are welcome!
The text was updated successfully, but these errors were encountered: