Liquibase Plugin for VS Code
This Visual Studio Code extension simplifies working with Liquibase by automating routine tasks and enhancing the user experience.
Getting Started
Setup Wizard
After installing the extension, launch the setup wizard to configure your environment:
- Press
Ctrl+Shift+P or click the Liquibase icon in the status bar
- Run the command Liquibase: Run Full Setup Wizard
- Follow the prompts to configure:
- Path to your
liquibase.properties file
- Main (parent) changelog file
- Default file formats for changelogs and changesets
- Naming patterns for generated files
- Default author name
Creating a Changelog
- Right-click the folder where you'd like to create a changelog
- Select Liquibase: Create Changelog
- The changelog file will be created and opened. If a parent changelog is configured, it will be updated automatically.
Creating a Changeset
- Right-click the folder where you'd like to create a changeset
- Select Liquibase: Create Changeset
- Enter required values based on your naming pattern
- Choose a changelog to associate the new changeset with (optional)
- Choose Yes if you want to link all changesets in the folder to this changelog
- The new changeset will be created and opened, along with the associated changelog
Previewing SQL
- Open a changeset file
- Press
Ctrl+Shift+P or click the Liquibase icon in the status bar
- Select Liquibase: Generate SQL for Changeset
- Choose the target changeset from the dropdown list
- Select the SQL type:
- Full SQL – generates all SQL statements, including context or environment-related commands
- Short SQL – generates only SQL directly related to the selected changeset
- The generated SQL will open in a new editor tab
Configuration
You can configure the extension in one of the following ways:
- Open File > Preferences > Settings or press
Ctrl+, and search for Liquibase
- Run Liquibase: Plugin Settings from the command palette
Supported Variables in Naming Patterns
Use the following placeholders in naming templates:
{author} – Author name
{date} – Current date in the selected format (moment.js)
{name} – Name for the migration
{ext} – File extension (based on selected format)
{object} – Object name (for object-oriented patterns)
{release} – Release version (for release-based workflows)
Requirements
- Visual Studio Code 1.96.0 or later
- Liquibase must be installed and available in the system environment
Known Issues
- A valid
liquibase.properties file is required to generate SQL previews
Release Notes
0.0.1
- Initial release with core features:
- Support for XML, YAML, and JSON changelog formats
- Changelog and changeset creation
- SQL generation and preview
| |