-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[10.x] Ensureschema:dump
will dump the migrations table only if it exists
#51827
Conversation
…3-fix-schema-dump # Conflicts: # src/Illuminate/Database/Schema/PostgresSchemaState.php
One issue with this PR is we can't use facades from Illuminate components. Configuration will have to be injected. |
@taylorotwell I had that thought at first. But then I saw the component already depends on the config facade here. So, I am taking this is undesired? If yes, I'd remove the dependency in one go? Edit: how would you feel about |
|
Edit: was answered here #51813 (comment)
Interesting! I would have expected that each tenant has a own database config, and therefore each tenant an own default connection as well. To confirm I understand you correctly, |
schema:dump
will dump the migrations table only if it exists
I pushed the changes. Didn't touch the existing cc @Tofandel |
There is one default connection which is the main app, and each tenant has it's own database, but only one connection is configured for all the tenants (its the |
Fixes #51813
The
migrations
table is only available in then default connection.When running
schema:dump --database=Something
the command attempts to dump the migration table, too.This results in:
This PR checks if we are on the default connection and skips dumping migrations if not.
The command has not had any tests.
I don't think the scope of this PR requires to change this?