From f65db0226934aece78d531f6aa4c80d981aa0257 Mon Sep 17 00:00:00 2001 From: Denis Denisov Date: Sat, 20 Feb 2016 01:34:40 +0200 Subject: [PATCH] Preventing the creation of duplicate index TokuDB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fail to initialize ORM engine: sync database struct error: Error 1061: Duplicate key name … --- mysql_dialect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql_dialect.go b/mysql_dialect.go index 1a693753f..d7cb0cec9 100644 --- a/mysql_dialect.go +++ b/mysql_dialect.go @@ -411,7 +411,7 @@ func (db *mysql) GetColumns(tableName string) ([]string, map[string]*core.Column func (db *mysql) GetTables() ([]*core.Table, error) { args := []interface{}{db.DbName} s := "SELECT `TABLE_NAME`, `ENGINE`, `TABLE_ROWS`, `AUTO_INCREMENT` from " + - "`INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB')" + "`INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB' OR `ENGINE` = 'TokuDB')" db.LogSQL(s, args) rows, err := db.DB().Query(s, args...)