[11.x] Non-default schema names#50019
Merged
taylorotwell merged 37 commits intolaravel:masterfrom Feb 12, 2024
Merged
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. |
Member
|
Any breaking changes that will need to be documented here? |
Contributor
Author
|
@taylorotwell no, it's just a fix. |
Member
|
Thanks! |
Contributor
|
Hi @hafezdivandari Thanks for your effort to now fully support schema names in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds tests for all schema operations with prefixed table and with custom schema name. Some schema methods were not working properly in these cases that are fixed on this PR:
Prefixed table
Non-default Schema name
Prefixed table on non-default schema
Most of schema operations wasn't working on this case, that is fixed now. Grammar was always prefixing the first segment of passed values, that causes a problem when passing a table as
schema.tableand being wrapped asprefix_schema.table, this conditions is fixed by separating the logic for wrapping columns/values from wrapping tables after this PR:table.columnbeing wrapped toprefix_table.columnusingGrammar::wrap()as before.schema.tablebeing wrapped asschema.prefix_tableusingGrammar::wrapTable()as expected.P.S: This is just a fix and adds support for prefixed table and using non-default schema on all cases, it's not changing behavior so we don't need to add anything to upgrade guide.
Summary of tested and fixed cases