I am implementing liquibase for database deployment, new to liquibase, learning it.
Question: I have pks/pkb packages and I want to deploy them using liquibase, I have purposely added errors in pkb package(change the function name which doesn't exist in pks). Liquibase always deploying those packages to database in successful state but when I am looking at package using Oracle SQL developer its having compilation error. Liquibase should the fail the deployment if there is an error in package.
If pks/pkb are having any compilation error, liquibase should not deploy them and should through an error
My Changelog File
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
<changeSet author="N_Pawar" id="86e6529" failOnError="true" dbms="oracle">
<sqlFilePath="D:/Jenkins_Build/CentralLOB/Builds/dev/DevOps/Database/OraclePackage/Packages/PKG_ENTITYNOTESORDSDevOps.pkb" stripComments="true" endDelimiter="\n/" relativeToChangelogFile="false"/>
</changeSet>
</databaseChangeLog>
========================================================================================================
I have tried the below code. E.g.:- I want to deploy test1.pkb and test2.pkb OR it could be pks,pkb so if there is any compilation error in any of the package it should fail the deployment and throw compilation error. The code I am trying as per suggestion on stackoverflow is, <changeSet author="N_Pawar" id="01dae122" failOnError="true" runAlways="true"> <sql stripComments="true" splitStatements="true" endDelimiter="\n/"> BEGIN DBMS_UTILITY.COMPILE_SCHEMA(schema => <packgeName, I know I should mentioned schema name here>, compile_all => FALSE); END; </sql> </changeSet> please let me know if I am trying somethign wrong |