Skip to content

[5.2] MySQL migrations with comments usign ANSI_QUOTES mode #14709

Closed
@schleumer

Description

When using ANSI_QUOTES it's impossible to execute a migration that has comments on columns, because they are wrapped with double quotes, not with single quotes.

I made local changes on Illuminate\Database\Schema\Grammars\MySqlGrammar just to test my hipotesis, my tests with single quotes in comments worked with and without ANSI_QUOTES, so comments can be wrapped with single quotes.

The code from MySqlGrammar.php:

return ' comment "'.$column->comment.'"';

Became:

return " comment '".$column->comment."'";

I'll make a pull request soon if confirmed.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions