createPackageBody
Creates a stored package body.
Available attributes
catalogName |
Name of the catalog |
|
all |
|
comments |
|
|
all |
|
dbms |
Logical expression of database type(s) on which the change must be applied. Valid database type names are listed on the supported databases page.
It can be a comma separated list of multiple databases.
Or You can also specify that a change is NOT applicable to a particular database type by prefixing with ! . The keywords all and none are also available. |
|
all |
3.1 |
encoding |
Encoding used in the file defined in the `path` attribute |
|
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 |
all |
|
procedureText |
The SQL creating the procedure. Either this or the path attribute needs to be defined. |
all |
all |
|
relativeToChangelogFile |
Whether the file path relative to the root changelog file rather than to the classpath. |
|
all |
|
replaceIfExists |
If the stored procedure defined by procedureName already exits alter it instead of creating it. |
|
all |
|
schemaName |
Name of the schema |
|
all |
|
XML example
<changeSet author="liquibase-docs" id="createPackageBody-example">
<pro:createPackageBody catalogName="cat"
comments="A String"
dbms="h2, !oracle, mysql"
encoding="UTF-8"
packageBodyName="A String"
path="com/example/my-logic.sql"
relativeToChangelogFile="true"
replaceIfExists="false"
schemaName="public">A String</pro:createPackageBody>
</changeSet>
YAML example
changeSet:
id: createPackageBody-example
author: liquibase-docs
changes:
- createPackageBody:
catalogName: cat
comments: A String
dbms: h2, !oracle, mysql
encoding: UTF-8
packageBodyName: A String
packageBodyText: A String
path: com/example/my-logic.sql
relativeToChangelogFile: true
replaceIfExists: false
schemaName: public
JSON example
{ "changeSet": { "id": "createPackageBody-example", "author": "liquibase-docs", "changes": [ { "createPackageBody": { "catalogName": "cat", "comments": "A String", "dbms": "h2, !oracle, mysql", "encoding": "UTF-8", "packageBodyName": "A String", "packageBodyText": "A String", "path": "com/example/my-logic.sql", "relativeToChangelogFile": true, "replaceIfExists": false, "schemaName": "public" } }] } }
Database support
DB2/LUW |
Supported
|
No |
DB2/z |
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 |