From a4a81f7b962102ba1ed3a60d9ac52c62a57c4458 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 7 Jan 2012 15:37:51 -0500 Subject: - [bug] the "name" of an FK constraint in SQLite is reflected as "None", not "0" [ticket:2364]. SQLite does not appear to support constraint naming in any case (the names are ignored). --- lib/sqlalchemy/dialects/sqlite/base.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 63f66f9d2..004798956 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -697,6 +697,8 @@ class SQLiteDialect(default.DefaultDialect): if row is None: break (constraint_name, rtbl, lcol, rcol) = (row[0], row[2], row[3], row[4]) + if not constraint_name: + constraint_name = None # sqlite won't return rcol if the table # was created with REFERENCES , no col if rcol is None: -- cgit v1.2.1