From 82c01936cf935ad3d8b53dc2e31afcd2c756d7e0 Mon Sep 17 00:00:00 2001 From: Fabian Holler Date: Fri, 27 Oct 2017 17:11:01 +0200 Subject: [PATCH] driver: fix: driver/mysql/mysql.go:89:23: undefined: mysql.MySQLWarnings compilation failed with: driver: fix: driver/mysql/mysql.go:89:23: undefined: mysql.MySQLWarnings MySQLWarnings was removed from the mysql driver (https://github.com/go-sql-driver/mysql/pull/676), remove it from migrate --- driver/mysql/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/mysql/mysql.go b/driver/mysql/mysql.go index 86746ff..ccbb582 100644 --- a/driver/mysql/mysql.go +++ b/driver/mysql/mysql.go @@ -86,7 +86,7 @@ func (driver *Driver) Close() error { func (driver *Driver) ensureVersionTableExists() error { _, err := driver.db.Exec("CREATE TABLE IF NOT EXISTS " + tableName + " (version bigint not null primary key);") - if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn { + if err != nil return err } r := driver.db.QueryRow("SELECT data_type FROM information_schema.columns where table_name = ? and column_name = 'version'", tableName)