Need Liquibase® support? Liquibase Pro is now available! Try it out free.
2018 XML Announcement

Change: ‘createPackageBody’

Creates a stored package body

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall
dbmsall3.1
encodingall
packageBodyNameName of the package body to dropallall
packageBodyTextallall
pathFile containing the procedure text. Either this attribute or a nested procedure text is required.all
procedureBodyall
relativeToChangelogFileall
replaceIfExistsall
schemaNameName of the schemaall
<changeSet author="liquibase-docs"
        id="createPackageBody-example"
        objectQuotingStrategy="LEGACY">
    <ext:createPackageBody catalogName="cat"
            dbms="h2, oracle"
            encoding="UTF-8"
            packageBodyName="A String"
            path="com/example/my-logic.sql"
            relativeToChangelogFile="true"
            replaceIfExists="false"
            schemaName="public">A String</ext:createPackageBody>
</changeSet>
changeSet:
  id: createPackageBody-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - createPackageBody:
      catalogName: cat
      dbms: h2, oracle
      encoding: UTF-8
      packageBodyName: A String
      packageBodyText: A String
      path: com/example/my-logic.sql
      procedureBody: |-
        CREATE OR REPLACE PROCEDURE testHello
            IS
            BEGIN
              DBMS_OUTPUT.PUT_LINE('Hello From The Database!');
            END;
      relativeToChangelogFile: true
      replaceIfExists: false
      schemaName: public
{
  "changeSet": {
    "id": "createPackageBody-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "createPackageBody": {
          "catalogName": "cat",
          "dbms": "h2, oracle",
          "encoding": "UTF-8",
          "packageBodyName": "A String",
          "packageBodyText": "A String",
          "path": "com/example/my-logic.sql",
          "procedureBody": "CREATE OR REPLACE PROCEDURE testHello\n    IS\n    BEGIN\n      DBMS_OUTPUT.PUT_LINE('Hello From The Database!');\n    END;",
          "relativeToChangelogFile": true,
          "replaceIfExists": false,
          "schemaName": "public"
        }
      }]
    
  }
}

Database Support

DatabaseNotesAuto Rollback
DB2SupportedNo
DerbyNot SupportedNo
FirebirdNot SupportedNo
H2Not SupportedNo
HyperSQLNot SupportedNo
INGRESNot SupportedNo
InformixNot SupportedNo
MariaDBNot SupportedNo
MySQLNot SupportedNo
OracleSupportedNo
PostgreSQLNot SupportedNo
SQL ServerNot SupportedNo
SQLiteNot SupportedNo
SybaseNot SupportedNo
Sybase AnywhereNot SupportedNo