Creates a stored package body
Name | Description | Required For | Supports | Since |
---|---|---|---|---|
catalogName | Name of the catalog | all | ||
comments | all | |||
dbms | all | 3.1 | ||
encoding | all | |||
packageBodyName | Name of the package body to drop | all | all | |
packageBodyText | all | all | ||
path | File containing the procedure text. Either this attribute or a nested procedure text is required. | all | ||
procedureText | all | |||
relativeToChangelogFile | all | |||
replaceIfExists | all | |||
schemaName | Name of the schema | all |
<changeSet author="liquibase-docs" id="createPackageBody-example">
<pro:createPackageBody catalogName="cat"
comments="A String"
dbms="h2, oracle"
encoding="UTF-8"
packageBodyName="A String"
path="com/example/my-logic.sql"
relativeToChangelogFile="true"
replaceIfExists="false"
schemaName="public">A String</pro:createPackageBody>
</changeSet>
changeSet:
id: createPackageBody-example
author: liquibase-docs
changes:
- createPackageBody:
catalogName: cat
comments: A String
dbms: h2, oracle
encoding: UTF-8
packageBodyName: A String
packageBodyText: A String
path: com/example/my-logic.sql
procedureText: |-
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",
"changes": [
{
"createPackageBody": {
"catalogName": "cat",
"comments": "A String",
"dbms": "h2, oracle",
"encoding": "UTF-8",
"packageBodyName": "A String",
"packageBodyText": "A String",
"path": "com/example/my-logic.sql",
"procedureText": "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 | Notes | Auto Rollback |
---|---|---|
DB2 | Supported | No |
DB2 | Supported | No |
Derby | Supported | No |
Firebird | Supported | No |
H2 | Supported | No |
HyperSQL | Supported | No |
INGRES | Supported | No |
Informix | Supported | No |
MariaDB | Supported | No |
MySQL | Supported | No |
Oracle | Supported | No |
PostgreSQL | Supported | No |
SQL Server | Supported | No |
SQLite | Supported | No |
Sybase | Supported | No |
Sybase Anywhere | Supported | No |