migrations icon indicating copy to clipboard operation
migrations copied to clipboard

Nowdoc strings

Open alexeyshockov opened this issue 5 years ago • 0 comments

Feature Request

Generate multiline SQL (from --formatted) statements using nowdoc strings instead of current single quoted strings.

Q A
New Feature yes
RFC no
BC Break no

Summary

The main advantage of nowdoc strings is that you don't need to escape characters inside, so a raw query can be put inside. It makes sense for multiline queries (like create table, for example), because escaping breaks SQL highlighting in IDE (PHPStorm, for example, highlights SQL strings, but if there are escaped quotes ('... COMMENT \'(DC2Type:carbondatetime)\' ...'), the whole highlighting breaks and reports it as a syntax error).

Not a big deal, but IMO nice to have.

alexeyshockov avatar Mar 04 '20 13:03 alexeyshockov