diff --git a/VERSION b/VERSION index 0c1f5f05..ddee1e57 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-05 22:29:48) dev +Version 2.00.0 (2012-07-05 22:33:40) dev diff --git a/gluon/dal.py b/gluon/dal.py index 4a44856c..ff977083 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -678,7 +678,7 @@ class BaseAdapter(ConnectionPool): id_fieldname = referenced in table._db \ and table._db[referenced]._id.name or 'id' ftype = self.types[field.type[:9]] % dict( - index_name = self.varquote(tablename+'__idx'), + index_name = self.varquote(field.name+'__idx'), field_name = self.varquote(field.name), constraint_name = self.varquote(constraint_name), foreign_key = '%s (%s)' % (self.varquote(referenced), @@ -2043,7 +2043,7 @@ class MySQLAdapter(BaseAdapter): 'list:string': 'LONGTEXT', 'list:reference': 'LONGTEXT', 'big-id': 'BIGINT AUTO_INCREMENT NOT NULL', - 'big-reference': 'BIGINT, INDEX %(index_name)s (%(field_name)s), FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s', + 'big-reference': 'BIGINT, INDEX %(index_name`)s (%(field_name)s), FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s', } def varquote(self,name):