Dear community,
i'm using Oracle SQLcl (version 23.3) build-in liquibase.
Contrary to the documentation (online and bulid-in) Oracle SQLcl built-in liquibase commands 'diff' and 'diff-changeLog' do not takes stored procedures into account with and without using parameter -diff-types storedprocedures while stored procedures are present in source db and partly in target db.
Setup:
SQLcl: RELEASE=23.3.0.270.1251 JULIAN_BUILD_VERSION=23.3.0.270.1251 LATEST_BUILD=sqlcl-23.3.0.270.1251-2023-09-2712:51:35+0000
Liquibase Version: 4.18.0 #5864 built at 2022-12-02 18:02+0000
Extension Version: 23.3.0.0/23.1.37-000100
Database: Oracle Database 19c Enterprise Edition Version 19.18.0.0.0 (Multitenant)
At source db
CREATE TABLE MYTAB
( ID NUMBER
);
create or replace function foo
return boolean
AS
begin
return true;
end foo;
create or replace procedure bar
As
begin
if foo then null; else null; end if;
end bar;
create or replace package mypackage
as
n constant number := 4;
end;
Check objects in source db
select * from user_objects;
OBJECT_NAME OBJECT_TYPE
----------- -----------
FOO FUNCTION
MYTAB TABLE
BAR PROCEDURE
MYPACKAGE PACKAGE
At target db:
create or replace procedure bar
As
begin
null;
end bar;
Check objects in target db
select * from user_objects;
OBJECT_NAME OBJECT_TYPE
----------- -----------
BAR PROCEDURE
Actions:
Logon to source db:
"C:\***\sqlcl\bin\sql.exe" -L ***/***@//***:***/source_db
Run liquibase:
lb diff-changelog -reference-url jdbc:oracle:thin:@//***:***/target_db -reference-username *** -reference-password *** -dit storedprocedures
returns:
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"/>
==> No stored procedure mentioned at all.
Is this a documentation error, a bug or are there any other reasons for thist unexpected behaviour?
Kindly regards!