Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQLcl/Liquibase is not seeing a difference in updated tables

Alistair RedpathJan 20 2025 — edited Jan 20 2025

Hi,

I've been using SQLcl and Liquibase to perform CICD for Oracle APEX for a couple of years now but I find that every now and then (presumably with updates) things stop working as I expect, but when I check the patch notes I don't see anything relevant. Please excuse me if I am just missing something in the patch notes.

Anyway, the issue I'm having is that I've updated two tables, TABLE_1 and TABLE2 as well as an assortment of various procedures, views, etc.
The other database objects update just fine (including the creation of brand new tables), because they can of course just drop and rebuild, but where it usually intelligently detects changes to tables and, for example, adds new columns, it's now declaring that those tables have no changes and thus isn't adding the columns. It clearly knows something has changed, as it's trying to execute the changeset.

The git repo with the controller.xml, table_1_table.xml, and table_2_table.xml is up to date and their respective files show the new columns. However, when it runs those changesets it says (names, schema and hashes changed for anonymity):

[2025-01-20 05:11:18] --Starting Liquibase at 2025-01-20T05:11:18.954421154 (version 4.25.0.305.0400 #0 built at 2024-10-31 21:25+0000) 
[2025-01-20 05:11:34] Running Changeset: table_1_table.xml::e8def81b[...]96d63f947f::(DEV)-Generated 
[2025-01-20 05:11:34] Executed :-- Objects are the the same, no work to do 
[2025-01-20 05:11:34] Returned no results!! 
[2025-01-20 05:11:34] Running Changeset: table_2_table.xml::bfbb5d9894f4dc40[...]956be33b7cf8c::(DEV)-Generated 
[2025-01-20 05:11:34] Executed :-- Objects are the the same, no work to do 
[2025-01-20 05:11:34] Returned no results!! 
[2025-01-20 05:11:35] Running Changeset: brand_new_table_table.xml::49df9c394e94a0c4b1d40da99363b63d2e69a225::(DEV)-Generated 
[2025-01-20 05:11:35] Table "BRAND_NEW_TABLE" created. 
...

Edit to add my code, sorry:

Creation (from dev database):

lb generate-controlfile
lb generate-schema -sql -debug

Deployment (to test database):

declare
l_workspace_id number;
begin
l_workspace_id := apex_util.find_security_group_id(p_workspace => 'DEV');
apex_util.set_security_group_id(p_security_group_id => [SGID]);
end;
/
-- set define off;
-- set scan off;
cd code/schema

!sed '[excluding a couple of specific files, not relevant, has not changed in many months]' controller.xml > controllerfixed.xml

--checking that file includes everything it should, it does
!cat controllerfixed.xml

alter session set current_schema = DEV;

--Have tried running with and without clear-checksums
lb clear-checksums
lb validate -changelog-file controllerfixed.xml -debug
lb update -changelog-file controllerfixed.xml -debug

Comments

BluShadow Mar 18 2024

Oracle support documents are available to paying customers through the support portal: support.oracle.com

If you are not a paying customer then I'm afraid you won't have access to the document, and it is a breach of any customer's agreement with Oracle to supply such support documents to others.

1 - 1

Post Details

Added on Jan 20 2025
3 comments
182 views