Using
Liquibase is a development tool that allows you to apply changes to the EDB database using the Liquibase CLI and view them on the Liquibase Hub.
Creating a project on Liquibase Hub
Create a project for the target database instance on the Liquibase Hub. All data related to the target database is stored in this project.
Log in to the Liquibase Hub console.
Create a Project on the Liquibase Hub. Select Projects > Create Project.
On the Create Project page, enter the name and description of the project.
Select Create Project.
Applying database changes
These examples show how to apply database changes using Liquibase changesets, including:
See the Liquibase documentation for available change types.
Note
All Liquibase commands in the examples are executed from the directory where Liquibase Pro is installed.
The initial database objects and data for these examples are created using this sample script:
Updating tables
Create a changelog file using one of the following options for creating a changelog file:
Create the file manually. See the following changelog file example. (For detailed information on changelogs, see the changelog documentation from Liquibase.)
Generate a sample file and update it with your changes. Generate the sample changelog file using this command:
./liquibase --changeLogFile=edb_dbchangelog.xml generateChangeLog
Note
Before the command runs, Liquibase takes a snapshot of the database, which is an essential step in the process.
For each database change, add a changeset entry to the changelog file. For detailed information on changesets, see the changeset documentation from Liquibase.
Register the changelog with the Liquibase Hub and provide the project name:
./liquibase registerChangeLog
Sample output:
Update the table in the target database:
./liquibase update
Rolling back changes
Roll back changes made to the table using the rollbackCount
command. For example, this command uses the sample changelog file:
./liquibase rollbackCount 1
Viewing database changes on Liquibase Hub
To view the details of the changes made on the target database, select a changelog link. For example, select dbchangelog.xml
to see its details.
The diagram shows the details for the selected changeset.
Could this page be better? Report a problem or suggest an addition!