We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sqlalchemy
Learn more about funding links in repositories.
Report abuse
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
Migrated issue, originally created by Michael Bayer (@zzzeek)
need to put this only on those DBs which support it (or override those that don't support it).
So far PG and SQLite seem to support it, MySQL does not:
--- a/lib/sqlalchemy/sql/compiler.py Thu Oct 20 15:00:17 2011 -0400 +++ b/lib/sqlalchemy/sql/compiler.py Fri Oct 21 20:07:28 2011 -0400 @@ -1403,7 +1403,11 @@ return text def visit_column_check_constraint(self, constraint): - text = "CHECK (%s)" % constraint.sqltext + text = "" + if constraint.name is not None: + text += "CONSTRAINT %s " % \ + self.preparer.format_constraint(constraint) + text += "CHECK (%s)" % constraint.sqltext text += self.define_constraint_deferrability(constraint) return text
The text was updated successfully, but these errors were encountered:
Michael Bayer (@zzzeek) wrote:
133a0b2
Sorry, something went wrong.
Changes by Michael Bayer (@zzzeek):
No branches or pull requests
Migrated issue, originally created by Michael Bayer (@zzzeek)
need to put this only on those DBs which support it (or override those that don't support it).
So far PG and SQLite seem to support it, MySQL does not:
The text was updated successfully, but these errors were encountered: