-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[11.x] Add support for modifying generated columns #50329
[11.x] Add support for modifying generated columns #50329
Conversation
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
This merge request causes issues with Postgres < 12. The column "attgenerated" used in src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php was only added in PostgreSQL 12 according to https://pgpedia.info/p/pg_attribute.html |
@driesvints Pgsql 12+ support on Laravel 11 reverted after this PR got merged. Just sent a PR #50834 to fix this. PS: I think we should also add database test workflows for pgsql 10 and sqlsrv 2017 to Laravel 11 test suites. |
Thanks @hafezdivandari. I agree. I'll try to get that in. |
Related to #48864 and #48357, this PR adds support for inspecting generated columns and fixes modifying them on SQLite and renaming them on legacy MySQL / MariaDB database.
Enhancements
generation
toSchema::getColumns()
generation
(null|array
):type
(string
): Generation type:'stored'
or'virtual'
.expression
(string
): Generation expression.