From e311da344128c2212652b6a7be4e95779bb3ebf3 Mon Sep 17 00:00:00 2001 From: Michele Comitini Date: Mon, 24 Jun 2013 15:23:57 +0200 Subject: [PATCH] "reference table.field" type bugfix --- gluon/dal.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gluon/dal.py b/gluon/dal.py index b67fc3d2..b579d8cb 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2549,6 +2549,9 @@ class PostgreSQLAdapter(BaseAdapter): 'geography': 'GEOGRAPHY', 'big-id': 'BIGSERIAL PRIMARY KEY', 'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s', + 'reference FK': ', CONSTRAINT FK_%(constraint_name)s FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s', + 'reference TFK': ' CONSTRAINT FK_%(foreign_table)s_PK FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s (%(foreign_key)s) ON DELETE %(on_delete_action)s', + } def varquote(self,name):