Fix schema connection caching#959
Open
circulon wants to merge 5 commits intoMasoniteFramework:3.xfrom
Open
Conversation
new_connection() now returns a new connection object and does not cache it get_connection() returns a cached connection or a new one if there is none cached
added a helper method for getting a query builder. This facilitates running arbitrary queries in migrations
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.
fixes #958
added a get_connection() method which returns the current connection object.
Additional:
added a helper to get a QueryBuilder instance associated with the same connection.
This allows easier usage of arbitrary queries (like DDL and
SETstatements) to be applied during migrations.MOTE: new_connection() does not cache the returned connection.
this allows independant connections to be used alongside each other without interaction