always-override-stored-logic-schema
Last updated: September 2, 2025
The --always-override-stored-logic-schema global parameter is a Boolean value that you can use with the createProcedure Change Type.
When you generate SQL for a procedure without specifying a schema name, --always-override-stored-logic-schema decides whether to explicitly include the default schema name with your procedure in the SQL.
The default value of --always-override-stored-logic-schema is false.
Uses
If you run the SQL generated with update-sql or rollback-sql on another database or client, the new system may have a different setting of --default-schema-name than the old one. In this case, you can set --always-override-stored-logic-schema to true to ensure that objects are consistently created in the same schema names across multiple databases.
The --always-override-stored-logic-schema parameter also affects the SQL Liquibase uses with the update command and rollback command. However, when you use these two commands, Liquibase always creates objects in the same schemas, even if the default schemas are different across the two systems, and regardless of the value of --always-override-stored-logic-schema.
Note: Some databases store SQL in an alias instead of a procedure, such as H2. In these cases, Liquibase may not explicitly add the schema prefix to the alias in the update-sql output. However, Liquibase still creates the alias in the appropriate schema.
schemaName attribute
You can use the createProcedure Change Type to define a stored SQL procedure in your changelog or a file you specify. createProcedure has an optional attribute called schemaName that determines which schema the procedure is created in.
When you create a procedure in Liquibase, the outputs of the update-sql command and rollback-sql command change based on what you specify for schemaName and --always-override-stored-logic-schema:
If you do specify
schemaName, Liquibase explicitly prefixes your schema name to your procedure name in theCREATE PROCEDUREstatement of the SQL. Liquibase does this even if the schema name was not specified in the actual SQL, and no matter what you set--always-override-stored-logic-schemato:CREATE <your_schema>.<your_procedure> AS…
If you don't specify
schemaNameand you set--always-override-stored-logic-schematotrue, Liquibase prefixes the value of the--default-schema-nameparameter to your procedure name:CREATE <default_schema>.<your_procedure> AS…
If you don't specify
schemaNameand you set--always-override-stored-logic-schematofalse, Liquibase does not explicitly modify the SQL to include the schema name. However, Liquibase still creates your procedure in schema specified by--default-schema-name:CREATE <your_procedure> AS…
Note: You can set a value for --default-schema-name or use the default one, which depends on your database. For example, the default value on an H2 database is PUBLIC.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
Liquibase properties file (defaults file) | liquibase.alwaysOverrideStoredLogicSchema: <true|false> |
Global flow file argument (example) | stages: Default: actions: - type: liquibase command: update globalArgs: { always-override-stored-logic-schema: "<true|false>" } |
Global CLI parameter | liquibase --always-override-stored-logic-schema=<true|false> update --changelog-file=example-changelog.xml |
JVM system property (JAVA_OPTS environment variable) | Unix: JAVA_OPTS=-Dliquibase.alwaysOverrideStoredLogicSchema=<true|false> Windows: JAVA_OPTS=-D"liquibase.alwaysOverrideStoredLogicSchema"=<true|false> |
Liquibase environment variables | LIQUIBASE_COMMAND_CHANGELOG_FILE=<true|false> |