Skip to content
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

Reintroduce support for multi-db setups #1426

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

benpoulson
Copy link
Contributor

This snipet was lost in the 2.12.x => 2.13.x change. Needs to be reintroduced to allow those who use fully qualified db+table names. (Eg, database.table)

Summary

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Misc. change (internal, infrastructure, maintenance, etc.)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

This snipet was lost in the 2.12.x => 2.13.x change. Needs to be reintroduced to allow those who use fully qualified db+table names. (Eg, `database.table`)
@mfn
Copy link
Collaborator

mfn commented Feb 21, 2023

This snipet was lost in the 2.12.x => 2.13.x change. Needs to be reintroduced to allow those who use fully qualified db+table names. (Eg, database.table)

Technically it wasn't "lost". The change is due to https://github.com/barryvdh/laravel-ide-helper/pull/1349/files

If we're going forward with this PR, we're now keeping a very mixed state here and I'm not sure anyone understands the outcome.

Original code:

        $database = null;
        if (strpos($table, '.')) {
            [$database, $table] = explode('.', $table);
        }

PR #1349:

        $database = $model->getConnection()->getName();
…
        $columns = $schema->listTableColumns($table, $database);

This PR:

        $database = $model->getConnection()->getName();
…
        if (strpos($table, '.')) {
            [$database, $table] = explode('.', $table);
        }

I.e. is the $database = $model->getConnection()->getName(); really needed when we bring back the explode?

I think my cautious side suggests we revert PR #1349 rather in its entirety.

WDYT?

@makroxyz
Copy link

Any news about this PR?

@technikman
Copy link

I had the same problem and this solution brings back the old function

@barryvdh
Copy link
Owner

barryvdh commented Mar 7, 2023

I'm not really sure. @mikebouwmans what do you think? Does this work for you?

@makroxyz
Copy link

makroxyz commented Mar 22, 2023

Any news about this PR?
I'm still locked to v2.12.3...

@ThomasSfflx
Copy link

Me too...
Any chance to have news on this topic ?

@barryvdh barryvdh closed this Feb 7, 2024
@barryvdh barryvdh reopened this Feb 7, 2024
@barryvdh barryvdh closed this Feb 7, 2024
@barryvdh barryvdh reopened this Feb 7, 2024
@barryvdh barryvdh mentioned this pull request Feb 7, 2024
5 tasks
@barryvdh barryvdh merged commit 62fc436 into barryvdh:master Feb 7, 2024
66 checks passed
@jameshulse
Copy link

Closes #1487

d3v2a pushed a commit to d3v2a/laravel-ide-helper that referenced this pull request Feb 16, 2024
This snipet was lost in the 2.12.x => 2.13.x change. Needs to be reintroduced to allow those who use fully qualified db+table names. (Eg, `database.table`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants