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
Hi,
Is it possible to add the constraints? I have in my model :
class Test(BaseModel): id = PrimaryKeyField(unique=True) quantity = IntegerField(constraints=[Check('quantity > 0')])
And in my migration :
class Test(BaseModel): id = PrimaryKeyField(unique=True) quantity = IntegerField()
My constraint is ignored by the migration module.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi. Sure, i will check it
Sorry, something went wrong.
Thanks,
Another alternative for setting constraints is as follows:
class Test(BaseModel): -id = PrimaryKeyField(unique=True) -quantity = IntegerField() -class Meta: --constraints = [Check('quantity > 0')]
No branches or pull requests
Hi,
Is it possible to add the constraints?
I have in my model :
And in my migration :
My constraint is ignored by the migration module.
Thanks.
The text was updated successfully, but these errors were encountered: