summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/sqlite/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py
index 0f3c54385..5109ff3a7 100644
--- a/lib/sqlalchemy/dialects/sqlite/base.py
+++ b/lib/sqlalchemy/dialects/sqlite/base.py
@@ -1394,7 +1394,8 @@ class SQLiteDialect(default.DefaultDialect):
self._find_cols_in_sig(referred_columns))
referred_name = referred_quoted_name or referred_name
options = {}
- for token in re.split(r" *ON *", onupdatedelete.upper()):
+
+ for token in re.split(r" *\bON\b *", onupdatedelete.upper()):
if token.startswith("DELETE"):
options['ondelete'] = token[6:].strip()
elif token.startswith("UPDATE"):