Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MySqlCommandInterpreter.cs #8826

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

mazuryv
Copy link

@mazuryv mazuryv commented Jan 21, 2025

#8056
767 length limitation in mysql

OrchardCMS#8056
767 length limitation in mysql
@sebastienros
Copy link
Member

LGTM. But needs @BenedekFarkas and @MatteoPiovanelli

@@ -91,20 +91,47 @@ public string[] CreateStatements(AddIndexCommand command) {
using (var sqlCommand = session.Connection.CreateCommand()) {
var columnNames = String.Join(", ", command.ColumnNames.Select(c => string.Format("'{0}'", c)));
var tableName = PrefixTableName(command.TableName);
var columnList = command.ColumnNames.ToList();
var indexMaximumLenght = 767;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indexMaximumLenght => indexMaximumLength

@mazuryv
Copy link
Author

mazuryv commented Jan 27, 2025

Without these changes recipe was fallen for me in Orchard.Recipes.Migrations
table.CreateIndex("IDX_RecStResRec_ExecId_StepN", "ExecutionId", "StepName");
MySqlServer 8.0.40/8.0.41

@sebastienros
Copy link
Member

LGTM but someone should validate it too. Or add a functional test.

@BenedekFarkas
Copy link
Member

LGTM but someone should validate it too. Or add a functional test.

I'll test it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants