From 91c813deeb59cf6dcb0499014a98934dabfb0c0f Mon Sep 17 00:00:00 2001 From: Charlie Chu Date: Fri, 25 Nov 2016 10:20:44 +0800 Subject: [PATCH] Fix MySQL syntax error. --- .../Storage/Internal/MySQLDatabaseCreator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/MySql.Data.EntityFrameworkCore/Storage/Internal/MySQLDatabaseCreator.cs b/Source/MySql.Data.EntityFrameworkCore/Storage/Internal/MySQLDatabaseCreator.cs index e06d1ea..007fd3c 100644 --- a/Source/MySql.Data.EntityFrameworkCore/Storage/Internal/MySQLDatabaseCreator.cs +++ b/Source/MySql.Data.EntityFrameworkCore/Storage/Internal/MySQLDatabaseCreator.cs @@ -152,7 +152,7 @@ protected override bool HasTables() protected override async Task HasTablesAsync(CancellationToken cancellationToken = default(CancellationToken)) { - string sql = "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = `" + _connection.DbConnection.Database + "`"; + string sql = "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '" + _connection.DbConnection.Database + "'"; long count = (long)await _rawSqlCommandBuilder.Build(sql).ExecuteScalarAsync(_connection, cancellationToken: cancellationToken); return count != 0; } @@ -175,4 +175,4 @@ private IReadOnlyList GetDropOps() return _sqlGenerator.Generate(ops); } } -} \ No newline at end of file +}