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