- attached test.py
Firebird: on delete restrict doesnt exists.
Issue #1884
resolved
In Firebird, the on delete restrict, doesnt exists.
The solution is simple:
in dialects/firebird/base.py
in the line 291 when declaring class FBDDLCompiler
include the next function:
def define_constraint_cascades(self, constraint):
text = ""
# Firebird Not Support ON DELETE RESTRICT is working as default -
# http://www.firebirdfaq.org/faq338/
if (constraint.ondelete != 'restrict') and (constraint.onupdate is not None):
text += " ON DELETE %s" % constraint.ondelete
if constraint.onupdate is not None:
text += " ON UPDATE %s" % constraint.onupdate
return text
Comments (4)
-
Account Deleted -
repo owner - changed milestone to 0.6.xx
If your application requires the specific semantics of RESTRICT, as described at http://en.wikipedia.org/wiki/Foreign_key#RESTRICT , then your app is not compatible with Firebird. Instead of using an incompatible keyword and having the firebird dialect silently fall back to non-compliant behavior, the application should be adjusted to not require RESTRICT.
So I am -1 on this change for now, will wait for other input.
-
repo owner - changed status to wontfix
closing for now.
-
repo owner - changed milestone to 1.x.xx
- Log in to comment
Test file