From b60452ef472c62a3ba108eaf1459e855ee010331 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 15 Jul 2013 09:22:01 -0500 Subject: [PATCH] fixed issue topic/web2py/LGxJR85pG88, thanks Oliver --- VERSION | 2 +- gluon/dal.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9685a970..ef2c7eb5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.14.16.51.54 +Version 2.6.0-development+timestamp.2013.07.15.09.21.09 diff --git a/gluon/dal.py b/gluon/dal.py index af204946..14e2de47 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -8307,8 +8307,9 @@ class Table(object): field_type = self if same_db else 'bigint' clones = [] for field in self: + nfk = same_db or field.type.startswith('reference') clones.append(field.clone( - unique=False, type=field.type if same_db else 'bigint')) + unique=False, type=field.type if nfk else 'bigint')) archive_db.define_table( archive_name, Field(current_record,field_type), *clones) self._before_update.append(