Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jun 10, 2017

PR for fixing issue #19496

Reminder

When postgresql database have multiple schemas, if you have the same table name in 2 different schemas then the getColumnListing() method will not return columns of the table that is in the currently used schema bu columns that are in the 2 tables.
This is due to compileColumnListing() method that does not consider the schema name of the table.

According to what was made in this PR #15535, I only consider the first schema if it's defined as an array in the configuration file.

Changes

  • Add getColumnListing() method in Illuminate\Database\Schema\PostgresBuilder.
  • Update compileColumnListing() method in Illuminate\Database\Schema\Grammars\PostgresGrammar to filter listing by schema name too.

KevinHivert added 2 commits June 7, 2017 23:42
- Add getColumnListing() method in Illuminate\Database\Schema\PostgresBuilderto override default.
- Update compileColumnListing() method in Illuminate\Database\Schema\Grammars\PostgresGrammar to filter listing by schema name.
- Replace double quotes.
@taylorotwell taylorotwell merged commit 6fcfc8a into laravel:master Jun 10, 2017
@taylorotwell
Copy link
Member

@themsaid can you verify this doesn't cause any issues with Postgres and works as expected?

@themsaid
Copy link
Member

Yes I believe it'll work as expected, the breaking part is that in 5.4 a check if a table exists will pass if the table exist in any schema, in 5.5 with this PR it'll only pass if the table exists in the default schema.

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.

2 participants