fixed issue topic/web2py/LGxJR85pG88, thanks Oliver

This commit is contained in:
mdipierro
2013-07-15 09:22:01 -05:00
parent fdad44315f
commit b60452ef47
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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(