You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is unfortunate since e.g. PhpStorm autoformatting inserts the space in a file where the SQL Dialect is set to SQLite. If a database is initialized with such a file, Phinx then struggles to apply migrations on top of that.
The fix should be simple: Allow optional spaces/whitespace in the regex contained in getPhinxType.
The text was updated successfully, but these errors were encountered:
That said, it's not clean to just assume that getPhinxType returns a string for key "name" and then pass that to parseDefaultValue in getColumns. This leads to a type error when "name" is a Literal. Instead, a meaningful exception should be thrown in that case that mentions the table name, column name, and given type (string). But that's another issue.
Recognized:
DECIMAL(10,5)
Rejected:
DECIMAL(10, 5)
This is unfortunate since e.g. PhpStorm autoformatting inserts the space in a file where the SQL Dialect is set to SQLite. If a database is initialized with such a file, Phinx then struggles to apply migrations on top of that.
The fix should be simple: Allow optional spaces/whitespace in the regex contained in
getPhinxType
.The text was updated successfully, but these errors were encountered: