From 5386efbdfecd54dff157fbfe975250b46ac7497a Mon Sep 17 00:00:00 2001 From: Toru Maesaka Date: Wed, 15 Nov 2023 06:36:13 -0800 Subject: [PATCH] pkg/driver/mysql: use single quotes to satisfy the ANSI_QUOTE mode (#475) --- pkg/driver/mysql/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/driver/mysql/mysql.go b/pkg/driver/mysql/mysql.go index 21930a9b..d5be6648 100644 --- a/pkg/driver/mysql/mysql.go +++ b/pkg/driver/mysql/mysql.go @@ -233,7 +233,7 @@ func (drv *Driver) DatabaseExists() (bool, error) { // MigrationsTableExists checks if the schema_migrations table exists func (drv *Driver) MigrationsTableExists(db *sql.DB) (bool, error) { match := "" - err := db.QueryRow(fmt.Sprintf("SHOW TABLES LIKE \"%s\"", + err := db.QueryRow(fmt.Sprintf("show tables like '%s'", drv.migrationsTableName)). Scan(&match) if err == sql.ErrNoRows {