What sort of query does Liquibase execute to determine whether the DATABASECHANGELOG table exists? This is for an Oracle database. Is it checking User_Tables by any chance?
What sort of query does Liquibase execute to determine whether the DATABASECHANGELOG table exists? This is for an Oracle database. Is it checking User_Tables by any chance?
Hi @pdembina,
Looks like for oracle, it’s:
String sql = "SELECT null as TABLE_CAT, a.OWNER as TABLE_SCHEM, a.TABLE_NAME as TABLE_NAME, " +
"a.TEMPORARY as TEMPORARY, a.DURATION as DURATION, 'TABLE' as TABLE_TYPE, " +
"c.COMMENTS as REMARKS, A.tablespace_name as tablespace_name, CASE WHEN A.tablespace_name = " +
"(SELECT DEFAULT_TABLESPACE FROM USER_USERS) THEN 'true' ELSE null END as default_tablespace " +
"from ALL_TABLES a " +
"join ALL_TAB_COMMENTS c on a.TABLE_NAME=c.table_name and a.owner=c.owner ";
so the ALL_TABLES and ALL_TAB_COMMENTS tables