Skip to content

Commit

Permalink
Merge pull request #7 from Multiverse-io/fix-table-list-join-criteria
Browse files Browse the repository at this point in the history
Fix join criteria for table metadata
  • Loading branch information
hoyon authored Jul 12, 2022
2 parents 4c7915b + f3bece6 commit 6205c03
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/parsers/db_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ where
column_name as column_name,
c.table_schema as schema_name
FROM information_schema.columns c
INNER JOIN information_schema.tables t on c.table_name = t.table_name
INNER JOIN information_schema.tables t on c.table_name = t.table_name and c.table_schema = t.table_schema
WHERE c.table_schema NOT IN ('information_schema', 'pg_catalog')
AND table_type = 'BASE TABLE'
ORDER BY table_name, column_name;",
Expand Down Expand Up @@ -140,6 +140,14 @@ mod tests {
)
.unwrap();

transaction
.batch_execute(
"
CREATE VIEW archived.location AS SELECT id, post_code FROM public.location
",
)
.unwrap();

let result = test(&mut transaction);

transaction.rollback().unwrap();
Expand Down

0 comments on commit 6205c03

Please sign in to comment.