Skip to content

Commit 625b9a1

Browse files
author
Philippe Lafoucrière
authored
Merge pull request #1 from scottjg/patch-1
Remove use of mysql.MySQLWarnings
2 parents c2d3691 + d6d8e6a commit 625b9a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysql.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ func (driver *Driver) Close() error {
8888

8989
func (driver *Driver) ensureVersionTableExists() error {
9090
_, err := driver.db.Exec("CREATE TABLE IF NOT EXISTS " + tableName + " (version bigint not null primary key);")
91-
92-
if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
91+
if err != nil {
9392
return err
9493
}
94+
9595
r := driver.db.QueryRow("SELECT data_type FROM information_schema.columns where table_name = ? and column_name = 'version'", tableName)
9696
dataType := ""
9797
if err := r.Scan(&dataType); err != nil {

0 commit comments

Comments
 (0)