-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Support views and foreign tables in yii\pgsql\Schema.findTableNames #7834
Conversation
Is it possible to add some tests for it? |
Sure, it's a good idea since I was wondering if there will be a difference between an ordinary and materialized view. |
I've added test but actually ran only sqlite and pgsql. I also found and fixed one bug in mssql tests introduced by dd15857, too much copy and paste and |
@@ -177,8 +177,10 @@ protected function findTableNames($schema = '') | |||
$schema = $this->defaultSchema; | |||
} | |||
$sql = <<<EOD | |||
SELECT table_name, table_schema FROM information_schema.tables | |||
WHERE table_schema=:schema AND table_type='BASE TABLE' | |||
SELECT c.relname AS table_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table_schema
isn't selected anymore. Are you sure it's OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
a3b25f2
to
5b30bfd
Compare
@samdark this one is also ready for merge |
Except changelog :) Also it seems there are conflicts with master now. |
…oes not include materialized views
5b30bfd
to
d313517
Compare
@samdark done, but somehow I messed up the |
Merged 29304a1 Thanks! |
@nineinchnick the syntax is a bit unnatural: |
References #7833.