The createProcedure Change Type defines the definition for a stored procedure. This Change Type is better to use for creating procedures than the raw SQL command because it will not attempt to strip comments or break up lines.

Often, it is best to use the CREATE OR REPLACE syntax along with setting runOnChange to true on the enclosing changeset tag. That way if you need to make a change to your procedure, you can change your existing code rather than creating a new REPLACE PROCEDURE call. The advantage to this approach is that it keeps your changelog smaller and allows you to more easily see what has changed in your procedure code through your source control system's diff command.

Available attributes

Name Description Required for Supports

Name of the catalog


Specifies which database type(s) a changeset is to be used for. See valid database type names on Liquibase Database Tutorials. Separate multiple databases with commas. Specify that a changeset is not applicable to a particular database type by prefixing with !. The keywords all and none are also available.


Encoding used in the file defined in the path attribute


File containing the procedure text. Either this attribute or a nested procedure text is required.

all all

The SQL creating the procedure. You need to define either this attribute or the path attribute. The procedureText attribute is not supported in the XML format; however, you can specify the procedure SQL in a nested format. See the XML example.

all all
procedureName Name of the stored procedure. Required if replaceIfExists=true.

Specifies whether the file path is relative to the changelog file rather than looked up in the search path. Default: false.


Boolean. If the stored procedure defined by procedureName already exists, alter it instead of creating it. Default: false.

Available in Liquibase 3.3 and later


Name of the schema


Database support

Database Notes Auto Rollback
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
Snowflake Supported No
SQL Server Supported No
SQLite Not Supported No
Sybase Supported No
Sybase Anywhere Supported No