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) |
|
Global flow file argument |
|
Global CLI parameter |
|
JVM system property(JAVA_OPTS environment variable) | Unix/Linux/Mac:
Windows:
|
Liquibase environment variable |
|
For more information, see Working with command parameters.
Change history
Version | Changes |
Liquibase Secure, version 5.0 | Parameter changed from Here are the previous values from when it was Liquibase properties file (defaults file) Global flow file argument
Global CLI parameter
JVM system property(JAVA_OPTS environment variable) Unix:
Windows:
Environment variable
|