-
Notifications
You must be signed in to change notification settings - Fork 892
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
Mysql adapter: Changing the STORED status #1953
Comments
Phinx doesn't handle generated columns. You should |
Well actually Phinx handles generated columns well enough, just not consistently. There's support through the literal type that kind of works. Sometimes
Since a majority of the use cases work already, I'd really welcome if phinx would eventually support the latter two cases where things fail. Maybe this could be a nice addition for v0.13? |
It is limitations of MySQL:
Phinx doesn't handle generated columns, but support comes through column definition with |
You're rephrasing what I wrote, so its hard not to agree :) Does the fact that mysql has limitations prevent phinx from picking up a workaround to achieve consistent behaviour? I believe that being able to rely on consistency even though the underlying database is lacking is one of the best reasons for using phinx, don't you? |
To add workarounds, Phinx needs generated columns support first. |
I found another problem with generated columns and NULL on MariaDB :
generates:
which causes syntax error, because SQL must not contains "NUL" nor "NOT NUL" . Is there any way how ommit NULL/NOT NULL ? |
I encountered an error when using the literal type to change columns.
As long as I change only the json path
c_json->>'$.to.something.else'
, all works well, but changingVIRTUAL
toSTORED
or vice-versa fails withPDOException: SQLSTATE[HY000]: General error: 3106 'Changing the STORED status' is not supported for generated columns. in /srv/varwwwhtml/glued-skeleton/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:194
...I think that when the STORED status is changed, the changed column needs to get dropped and recreated.
The text was updated successfully, but these errors were encountered: