summaryrefslogtreecommitdiff
path: root/odoo/tools/sql.py
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/tools/sql.py')
-rw-r--r--odoo/tools/sql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/tools/sql.py b/odoo/tools/sql.py
index 34d1a84cd98..bd947dd913c 100644
--- a/odoo/tools/sql.py
+++ b/odoo/tools/sql.py
@@ -141,7 +141,7 @@ def fix_foreign_key(cr, tablename1, columnname1, tablename2, columnname2, ondele
"""
# Do not use 'information_schema' here, as those views are awfully slow!
deltype = _CONFDELTYPES.get(ondelete.upper(), 'a')
- query = """ SELECT con.conname, c2.relname, a2.attnum, con.confdeltype as deltype
+ query = """ SELECT con.conname, c2.relname, a2.attname, con.confdeltype as deltype
FROM pg_constraint as con, pg_class as c1, pg_class as c2,
pg_attribute as a1, pg_attribute as a2
WHERE con.contype='f' AND con.conrelid=c1.oid AND con.confrelid=c2.oid