Sfoglia il codice sorgente

Fix migrations MySQL table check

pull/68/head
Matt Baer 5 anni fa
parent
commit
01f9dc86dc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      migrations/migrations.go

+ 1
- 1
migrations/migrations.go Vedi 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:


Caricamento…
Annulla
Salva