mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-24 08:46:48 +08:00
A bit more code styling in MySqlCommandInterpreter to avoid a ton of whitespace in the query
This commit is contained in:
@@ -97,9 +97,9 @@ namespace Orchard.Data.Migration.Interpreters {
|
||||
|
||||
if (columnList.Count > 1) {
|
||||
sqlCommand.CommandText = $@"
|
||||
SELECT SUM(CHARACTER_MAXIMUM_LENGTH)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = '{tableName}'
|
||||
SELECT SUM(CHARACTER_MAXIMUM_LENGTH)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = '{tableName}'
|
||||
AND COLUMN_NAME in ({columnNames})
|
||||
AND TABLE_SCHEMA = '{session.Connection.Database}'
|
||||
AND (Data_type = 'varchar');";
|
||||
@@ -117,9 +117,9 @@ namespace Orchard.Data.Migration.Interpreters {
|
||||
}
|
||||
// Check whether the index contains big nvarchar columns or text fields.
|
||||
sqlCommand.CommandText = $@"
|
||||
SELECT COLUMN_NAME
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = '{tableName}'
|
||||
SELECT COLUMN_NAME
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = '{tableName}'
|
||||
AND COLUMN_NAME in ({columnNames})
|
||||
AND TABLE_SCHEMA = '{session.Connection.Database}'
|
||||
AND ((Data_type = 'varchar' and CHARACTER_MAXIMUM_LENGTH > {indexMaximumLength}) OR data_type= 'text');";
|
||||
|
||||
Reference in New Issue
Block a user