generate-inline-sql

Last updated: October 24, 2025

--generate-inline-sql is a Boolean parameter that controls how Liquibase handles SQL code for stored logic objects when generating changelogs. The default value is false. This parameter is available in Liquibase Secure and requires a valid license.

Uses

When you run diff-changelog or generate-changelog commands to create changelogs from database objects, Liquibase needs to handle SQL code for stored logic objects like stored procedures, functions, triggers, and database packages. This parameter controls whether that SQL code is embedded directly in the changelog file or saved to separate external files.

When --generate-inline-sql=false (default):

  • SQL code for stored procedures, functions, triggers, and packages is saved to external `.sql` files

  • Changelog references these external files using file paths

  • Each database object gets its own separate SQL file

  • Better for managing large or complex stored logic

When --generate-inline-sql=true:

  • SQL code is embedded directly in the changelog file

  • No external SQL files are created

  • All SQL appears inline within changeSets

  • Simpler file structure with everything in one place

You may want to set --generate-inline-sql to true in the following scenarios:

  • Single-file distribution: You need to distribute changelogs as a single file without managing multiple external SQL files

  • Version control simplicity: You prefer having all changes in one file for easier tracking and review

  • Small stored logic: Your stored procedures and functions are small enough that inline storage is manageable

  • Deployment simplicity: You want to avoid coordinating multiple file paths during deployments

Keep the default value of false when:

  • Large stored logic: You have complex stored procedures or functions that are easier to manage in separate files

  • Modular organization: You prefer keeping SQL code separated for better organization and readability

  • Easier editing: You want to edit stored procedure code in dedicated SQL files with proper syntax highlighting

  • Reusability: You need to reference the same SQL files from multiple changelogs

Note: This parameter affects stored procedures, functions, triggers, database packages, and package bodies. It primarily applies to Oracle, SQL Server, PostgreSQL, and other databases that support stored logic.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.generateInlineSql: <true|false>

Global flow file argument

globalArgs: {generate-inline-sql: "<true|false>"}

Global CLI parameter

liquibase

--generate-inline-sql=<true|false>

diff-changelog

--changelog-file=mychangelog.xml

--url=<url>

--reference-url=<reference-url>

JVM system property(JAVA_OPTS environment variable)

Unix/Linux/Mac:

JAVA_OPTS=-Dliquibase.generateInlineSql=<true|false>

Windows:

JAVA_OPTS=-D"liquibase.generateInlineSql"=<true|false>

Liquibase environment variable

LIQUIBASE_GENERATE_INLINE_SQL=<true|false>

For more information, see Working with command parameters.

Change history

Version

Changes

Liquibase Secure, version 5.0

Parameter changed from --pro-sql-inline parameter to--generate-inline-sql.

Here are the previous values from when it was --pro-sql-inline.

Liquibase properties file (defaults file) liquibase.pro.sql.inline: <true|false>

Global flow file argument

globalArgs: {pro-sql-inline: "val"}

Global CLI parameter

liquibase

--pro-sql-inline=<true|false> update

--changelog-file=example-changelog.xml

JVM system property(JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.pro.sql.inline=<true|false>

Windows:

JAVA_OPTS=-D"liquibase.liquibase.pro.sql.inline"=<true|false>

Environment variable

LIQUIBASE_PRO_SQL_INLINE