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

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

Closed
schleumer opened this issue Aug 8, 2016 · 1 comment
Closed

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

schleumer opened this issue Aug 8, 2016 · 1 comment

Comments

@schleumer
Copy link
Contributor

schleumer commented Aug 8, 2016

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.

@themsaid
Copy link
Member

Please go ahead and make a PR, it's better to discuss implementations and see how tests react to this :)

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

No branches or pull requests

2 participants