Tuesday, April 27, 2021

Liquibase with Sqlcl doesn't support BLOB data type for "lb data" command

SQL> create table t1 (id number, name varchar2(20), clob_col clob, blob_col blob); Table created. SQL> insert into t1 values (1, 'Donghua', '{"id":1,"first_name":"Iron","last_name":"Man"}', utl_raw.cast_to_raw('Donghua')); 1 row created. SQL> commit; Commit complete. SQL> info t1; TABLE: T1 LAST ANALYZED: ROWS : SAMPLE SIZE : INMEMORY :DISABLED COMMENTS : Columns NAME DATA TYPE NULL DEFAULT COMMENTS ID NUMBER Yes NAME VARCHAR2(20 BYTE) Yes CLOB_COL CLOB Yes BLOB_COL BLOB Yes SQL> select * from t1; ID NAME CLOB_COL BLOB_COL _____ __________ _________________________________________________ _________________ 1 Donghua {"id":1,"first_name":"Iron","last_name":"Man"} 446F6E67687561


 SQL> lb version

Liquibase version: 4.1.1 Extension Version: 20.4.2.0 SQL> lb data -object t1 Action successfully completed please review created file data1.xml

data1.xml indicates that BLOB_COL is "UNSUPPORTED FOR DIFF: BINARY DATA"

<?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:schemaLocati on="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/dbchangel og/dbchangelog-4.1.xsd"> <changeSet author="oracle (generated)" id="1619509111980-1"> <insert tableName="T1"> <column name="ID" valueNumeric="1"/> <column name="NAME" value="Donghua"/> <column name="CLOB_COL" value="{&quot;id&quot;:1,&quot;first_name&quot;:&quot;Iron&quot;,&quot;last_name&quot;:&quot;Man&quot;}"/> <column name="BLOB_COL" valueComputed="UNSUPPORTED FOR DIFF: BINARY DATA"/> </insert> </changeSet> </databaseChangeLog>

No comments:

Post a Comment