Fix migrations MySQL table check

pull/68/head
Matt Baer 6 years ago
parent 70e823d6ab
commit 01f9dc86dc
  1. 2
      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:

Loading…
Cancel
Save