From 01f9dc86dce02a1bdd3122c269dab77d6110864e Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Fri, 18 Jan 2019 11:26:55 -0500 Subject: [PATCH] Fix migrations MySQL table check --- migrations/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/migrations.go b/migrations/migrations.go index 5b9b3bc..2aa3643 100644 --- a/migrations/migrations.go +++ b/migrations/migrations.go @@ -104,7 +104,7 @@ func (db *datastore) tableExists(t string) bool { if db.driverName == driverSQLite { err = db.QueryRow("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?", t).Scan(&dummy) } else { - err = db.QueryRow("SHOW TABLES LIKE ?", t).Scan(&dummy) + err = db.QueryRow("SHOW TABLES LIKE '" + t + "'").Scan(&dummy) } switch { case err == sql.ErrNoRows: