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

Add option to support DBs with non-uniform catalog table name #156

Closed
wants to merge 1 commit into from

Conversation

pjarra
Copy link

@pjarra pjarra commented Mar 20, 2023

DatabaseMetaData.getTables expects a recognized table type identifier as 5th parameter. This is one of the entries from .getTableTypes, and likely but not necessarily "TABLE". E.g. DuckDB instead uses "BASE TABLES", https://duckdb.org/docs/sql/information_schema,
and consequently ensure-migrations-table-exists fails during migration. This commit adds an additional key to the options map to SqlDatabase, allowing customization of this table type name, with a default of "TABLE".

@weavejester
Copy link
Owner

Thanks for the patch. Can you ensure it aligns with the CONTRIBUTING.md document, particularly around commit messages and code line length.

DatabaseMetaData.getTables expects a recognized table type identifier
as 5th parameter. This is one of the entries from .getTableTypes, and
likely but not necessarily "TABLE".
E.g. DuckDB uses "BASE TABLES", so with "TABLE" hardcoded, migration
fails because ensure-migrations-table-exists always tries to recreate
the migration table.
@pjarra
Copy link
Author

pjarra commented Mar 21, 2023

@weavejester this should be better?

@weavejester
Copy link
Owner

My thought is that with #158 merged, we no longer need this option, as databases with non-standard catalog names can be checked with a custom SQL query instead.

@weavejester weavejester closed this Nov 7, 2024
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