Fix migrations MySQL table check

This commit is contained in:
Matt Baer 2019-01-18 11:26:55 -05:00
parent 70e823d6ab
commit 01f9dc86dc

View file

@ -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: