get_foreign_keys only for tables, not aliases#56
get_foreign_keys only for tables, not aliases#56mdobrzanski wants to merge 1 commit intoibmdb:masterfrom
Conversation
|
When I have a chance will do a test with your code....I would image this filter will fix the duplicate fk...that include the (wrong) alias tables. I found out the ibm_db driver also has a function for this purpose ibm_db.foreign_keys.... |
|
This fixed the issue with the DB2 sample DB for me |
|
Changing the query for get_foreign_keys to check where the foreign key table is of type table helps to distinguish alias from table. Current new query This will help solve the autoload issue for SAMPLE database. This implementation is only on LUW server for now. The code change is implemented manually as the PR needs to be rebased. This is an important change and hence the change was implemented. We thank you for your contribution @mdobrzanski Thanks |
1 similar comment
|
Changing the query for get_foreign_keys to check where the foreign key table is of type table helps to distinguish alias from table. Current new query This will help solve the autoload issue for SAMPLE database. This implementation is only on LUW server for now. The code change is implemented manually as the PR needs to be rebased. This is an important change and hence the change was implemented. We thank you for your contribution @mdobrzanski Thanks |
Signed-off-by: amukherjee <amukherjee@rocketsoftware.com>
* code fix for issue #106 Signed-off-by: amukherjee <amukherjee@rocketsoftware.com> * Code changes for issue #24 Signed-off-by: amukherjee <amukherjee@rocketsoftware.com> * PR changes #74 Signed-off-by: amukherjee <amukherjee@rocketsoftware.com> * Fix for issue #20 and PR #56 Signed-off-by: amukherjee <amukherjee@rocketsoftware.com>
This is in reference to #20
The fix is to return foreign keys only between tables by making a join SQL and filtering tables by type = 'T'.