SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
LiquiBase Database Change Management http://www.liquibase.org March 30 th , 2009 Mike Willbanks Sr. Software Engineer, CaringBridge Inc.
What is LiquiBase LiquiBase is an open source, database-independent library for tracking, managing and applying database changes. Database changes are stored in an XML file and (optionally) checked into source control. LiquiBase executes changes based on this XML file to handle different revisions of database structures and data.
Why LiquiBase? Consistent database changes. Manage databases at different states. Keep a history of changes. Automatic rollback support. Ability of automation. Effectively manage variable change. Less human resources / errors.
Problems of Manual Changes Inconsistent application of changes. Ineffective mechanisms for managing changes. Database changes may or may not have been communicated to the team. Databases may become out of sync between environments.
The ChangeLog <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <databaseChangeLog xmlns=&quot;http://www.liquibase.org/xml/ns/dbchangelog/1.9&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd&quot;> <changeSet id=&quot;1&quot; author=&quot;mike&quot;> <createTable tableName=&quot;userGroup&quot;> <column name=&quot;id&quot; type=&quot;int&quot; autoIncrement=&quot;true&quot;> <constraints primaryKey=&quot;true&quot; nullable=&quot;false&quot; /> </column> <column name=&quot;name&quot; type=&quot;varchar(100)&quot; /> </createTable> </changeSet> </databaseChangeLog>  The changelog is an xml file where all database changes are listed. The changelog contains a changeset that lists each individual change. The above is an example of creating a table and adding columns.
Generating a ChangeLog Getting started, you may want to generate a list of your current database. LiquiBase makes this easy by allowing you to run a simple command from the command line client to generate a full changelog. Limitations do exist such that it will not export triggers, stored procedures, functions and packages. liquibase --driver=com.mysql.jdbc.Driver \    --classpath=/path/to/classes \    --changeLogFile=/path/to/db.changelog.xml \   --url=&quot;jdbc:mysql://hostname/database&quot; \   --username=dbusername \    --password=dbpassword \   generateChangeLog
Running a ChangeLog Running a changelog is easy, we will focus on the command line client. When you first run a changelog, LiquiBase manages those changelogs by adding two tables into your database. databasechangelog: maintains the database changes that were run. databasechangeloglock: ensures that two machines don't attempt to modify the database at one time. liquibase --driver=com.mysql.jdbc.Driver \    --classpath=/path/to/classes \    --changeLogFile=/path/to/db.changelog.xml \   --url=&quot;jdbc:mysql://hostname/database&quot; \   --username=dbusername \    --password=dbpassword \   migrate
LiquiBase Functionality LiquiBase refactoring functionality: Structural Columns, Tables, Views, Stored Procedures Data Quality Lookup Tables, Constraints, Sequences, Defaults. Referential Integrity Foreign Keys, Primary Keys Transformations Insert, Update, Delete, Tag, Stop Architectual Indexes Custom Custom SQL, Modify SQL, Execution
An Example We have a database &quot;meetup&quot;, we want to have two tables: meetup: contains an id, name, description and the date it was created and last updated. event: contains an id, a meetup id, event name, event description and event date.
Why LiquiBase over Alternatives XML file makes it easier to read changes and see a history of changes. Support for multiple ChangeLogs Example: Pre-Deployment, Post-Deployment. Run through automated systems. Heavily documented. Project activity.
Questions?

More Related Content

PPTX
Azure governance
PPTX
Azure Cloud Governance
PDF
Introduction To Liquibase
PPTX
Microsoft Cloud Adoption Framework for Azure: Governance Conversation
PPTX
Introduction to Apache Kafka
PPTX
Présentation pfe - Etude, conception et réalisation d'une application web de ...
PPTX
Présentation de PFE.pptx
Azure governance
Azure Cloud Governance
Introduction To Liquibase
Microsoft Cloud Adoption Framework for Azure: Governance Conversation
Introduction to Apache Kafka
Présentation pfe - Etude, conception et réalisation d'une application web de ...
Présentation de PFE.pptx

What's hot (20)

PPTX
Database versioning with liquibase
PPTX
Liquibase
ODP
Liquibase & Flyway @ Baltic DevOps
PPTX
Liquibase
PPTX
Database change management with Liquibase
PPTX
Continuous DB Changes Delivery With Liquibase
PPTX
Liquibase migration for data bases
PPTX
Liquibase case study
PDF
Elasticsearch in Netflix
DOCX
MySQL_SQL_Tunning_v0.1.3.docx
PPTX
Spring boot Introduction
PPTX
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
PPTX
Liquibase for java developers
PPTX
MongoDB presentation
PPTX
Kafka Connect - debezium
PDF
Microservice With Spring Boot and Spring Cloud
PDF
Making The Move To Java 17 (JConf 2022)
PDF
CDC patterns in Apache Kafka®
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Introduction to Git and GitHub
Database versioning with liquibase
Liquibase
Liquibase & Flyway @ Baltic DevOps
Liquibase
Database change management with Liquibase
Continuous DB Changes Delivery With Liquibase
Liquibase migration for data bases
Liquibase case study
Elasticsearch in Netflix
MySQL_SQL_Tunning_v0.1.3.docx
Spring boot Introduction
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
Liquibase for java developers
MongoDB presentation
Kafka Connect - debezium
Microservice With Spring Boot and Spring Cloud
Making The Move To Java 17 (JConf 2022)
CDC patterns in Apache Kafka®
Microservices with Java, Spring Boot and Spring Cloud
Introduction to Git and GitHub
Ad

Viewers also liked (20)

PPT
Liquibase – a time machine for your data
PDF
Javaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
PDF
Database migrations with Flyway and Liquibase
KEY
Agile Database Development with Liquibase
PPTX
Li liq liqui liquibase
PDF
Continuous Delivery and Zero Downtime: What your architecture needs to succeed
PPTX
Flyway: The agile database migration framework for Java
PPTX
Database Migrations with Gradle and Liquibase
KEY
Database Refactoring With Liquibase
PPTX
Continuous Delivery Applied
PDF
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
PDF
Maven and j unit introduction
PDF
RESTFul development with Apache sling
PPTX
Architecting for continuous delivery (33rd Degree)
PPTX
Frame switcher library
PDF
New MVC 1.0 JavaEE 8 API
KEY
Database Refactoring With Liquibase
PPTX
Flyway (33rd Degree)
PPTX
Refactoring domain driven design way
PPT
Unit Tests? It is Very Simple and Easy!
Liquibase – a time machine for your data
Javaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
Database migrations with Flyway and Liquibase
Agile Database Development with Liquibase
Li liq liqui liquibase
Continuous Delivery and Zero Downtime: What your architecture needs to succeed
Flyway: The agile database migration framework for Java
Database Migrations with Gradle and Liquibase
Database Refactoring With Liquibase
Continuous Delivery Applied
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
Maven and j unit introduction
RESTFul development with Apache sling
Architecting for continuous delivery (33rd Degree)
Frame switcher library
New MVC 1.0 JavaEE 8 API
Database Refactoring With Liquibase
Flyway (33rd Degree)
Refactoring domain driven design way
Unit Tests? It is Very Simple and Easy!
Ad

Similar to LiquiBase (20)

PPTX
Schema migration in agile environmnets
ODP
Handling Database Deployments
PDF
Liquibase få kontroll på dina databasförändringar
PPTX
Liquibase Integration with MuleSoft
DOC
Sql server-dba
PDF
Take your database source code and data under control
PDF
Mysql Replication Excerpt 5.1 En
PPT
Tauhid: SQL Server Database Change Automation
PPTX
MuleSoft integration with Liquibase | Mysore MuleSoft Meetup #3
ODP
MySQL 101 PHPTek 2017
PDF
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
PPT
Evolutionary Database Design
PPT
Database administrator project-presentation-1-v1
PDF
Delivering changes for applications and databases
PDF
FlywayDB Migration with Spring Boot
PPTX
final.pptx
PPT
Remote DBA Experts 11g Features
PDF
2012 replication
DOC
Sql server
PDF
Refresh development from productions
Schema migration in agile environmnets
Handling Database Deployments
Liquibase få kontroll på dina databasförändringar
Liquibase Integration with MuleSoft
Sql server-dba
Take your database source code and data under control
Mysql Replication Excerpt 5.1 En
Tauhid: SQL Server Database Change Automation
MuleSoft integration with Liquibase | Mysore MuleSoft Meetup #3
MySQL 101 PHPTek 2017
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
Evolutionary Database Design
Database administrator project-presentation-1-v1
Delivering changes for applications and databases
FlywayDB Migration with Spring Boot
final.pptx
Remote DBA Experts 11g Features
2012 replication
Sql server
Refresh development from productions

More from Mike Willbanks (20)

PDF
2015 ZendCon - Do you queue
PDF
ZF2: Writing Service Components
PDF
Writing Services with ZF2
PDF
Varnish Cache - International PHP Conference Fall 2012
PDF
Message Queues : A Primer - International PHP Conference Fall 2012
PDF
Push to Me: Mobile Push Notifications (Zend Framework)
PDF
Gearman - Northeast PHP 2012
PDF
Varnish Cache
PDF
Varnish, The Good, The Awesome, and the Downright Crazy.
PDF
Leveraging Zend Framework for Sending Push Notifications
PDF
Gearman: A Job Server made for Scale
PDF
Varnish, The Good, The Awesome, and the Downright Crazy
PDF
Zend Framework Push Notifications
PDF
Mobile Push Notifications
PDF
SOA with Zend Framework
ODP
MNPHP Scalable Architecture 101 - Feb 3 2011
ODP
The Art of Message Queues - TEKX
ODP
Art Of Message Queues
ODP
Scalable Architecture 101
ODP
The Art of Message Queues
2015 ZendCon - Do you queue
ZF2: Writing Service Components
Writing Services with ZF2
Varnish Cache - International PHP Conference Fall 2012
Message Queues : A Primer - International PHP Conference Fall 2012
Push to Me: Mobile Push Notifications (Zend Framework)
Gearman - Northeast PHP 2012
Varnish Cache
Varnish, The Good, The Awesome, and the Downright Crazy.
Leveraging Zend Framework for Sending Push Notifications
Gearman: A Job Server made for Scale
Varnish, The Good, The Awesome, and the Downright Crazy
Zend Framework Push Notifications
Mobile Push Notifications
SOA with Zend Framework
MNPHP Scalable Architecture 101 - Feb 3 2011
The Art of Message Queues - TEKX
Art Of Message Queues
Scalable Architecture 101
The Art of Message Queues

Recently uploaded (20)

PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
STKI Israel Market Study 2025 version august
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
The various Industrial Revolutions .pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Architecture types and enterprise applications.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
TLE Review Electricity (Electricity).pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Programs and apps: productivity, graphics, security and other tools
STKI Israel Market Study 2025 version august
OMC Textile Division Presentation 2021.pptx
The various Industrial Revolutions .pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Univ-Connecticut-ChatGPT-Presentaion.pdf
A novel scalable deep ensemble learning framework for big data classification...
observCloud-Native Containerability and monitoring.pptx
Hindi spoken digit analysis for native and non-native speakers
WOOl fibre morphology and structure.pdf for textiles
gpt5_lecture_notes_comprehensive_20250812015547.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Architecture types and enterprise applications.pdf
A comparative study of natural language inference in Swahili using monolingua...
TLE Review Electricity (Electricity).pptx
NewMind AI Weekly Chronicles – August ’25 Week III
DP Operators-handbook-extract for the Mautical Institute
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
NewMind AI Weekly Chronicles - August'25-Week II

LiquiBase

  • 1. LiquiBase Database Change Management http://www.liquibase.org March 30 th , 2009 Mike Willbanks Sr. Software Engineer, CaringBridge Inc.
  • 2. What is LiquiBase LiquiBase is an open source, database-independent library for tracking, managing and applying database changes. Database changes are stored in an XML file and (optionally) checked into source control. LiquiBase executes changes based on this XML file to handle different revisions of database structures and data.
  • 3. Why LiquiBase? Consistent database changes. Manage databases at different states. Keep a history of changes. Automatic rollback support. Ability of automation. Effectively manage variable change. Less human resources / errors.
  • 4. Problems of Manual Changes Inconsistent application of changes. Ineffective mechanisms for managing changes. Database changes may or may not have been communicated to the team. Databases may become out of sync between environments.
  • 5. The ChangeLog <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <databaseChangeLog xmlns=&quot;http://www.liquibase.org/xml/ns/dbchangelog/1.9&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd&quot;> <changeSet id=&quot;1&quot; author=&quot;mike&quot;> <createTable tableName=&quot;userGroup&quot;> <column name=&quot;id&quot; type=&quot;int&quot; autoIncrement=&quot;true&quot;> <constraints primaryKey=&quot;true&quot; nullable=&quot;false&quot; /> </column> <column name=&quot;name&quot; type=&quot;varchar(100)&quot; /> </createTable> </changeSet> </databaseChangeLog> The changelog is an xml file where all database changes are listed. The changelog contains a changeset that lists each individual change. The above is an example of creating a table and adding columns.
  • 6. Generating a ChangeLog Getting started, you may want to generate a list of your current database. LiquiBase makes this easy by allowing you to run a simple command from the command line client to generate a full changelog. Limitations do exist such that it will not export triggers, stored procedures, functions and packages. liquibase --driver=com.mysql.jdbc.Driver \ --classpath=/path/to/classes \ --changeLogFile=/path/to/db.changelog.xml \ --url=&quot;jdbc:mysql://hostname/database&quot; \ --username=dbusername \ --password=dbpassword \ generateChangeLog
  • 7. Running a ChangeLog Running a changelog is easy, we will focus on the command line client. When you first run a changelog, LiquiBase manages those changelogs by adding two tables into your database. databasechangelog: maintains the database changes that were run. databasechangeloglock: ensures that two machines don't attempt to modify the database at one time. liquibase --driver=com.mysql.jdbc.Driver \ --classpath=/path/to/classes \ --changeLogFile=/path/to/db.changelog.xml \ --url=&quot;jdbc:mysql://hostname/database&quot; \ --username=dbusername \ --password=dbpassword \ migrate
  • 8. LiquiBase Functionality LiquiBase refactoring functionality: Structural Columns, Tables, Views, Stored Procedures Data Quality Lookup Tables, Constraints, Sequences, Defaults. Referential Integrity Foreign Keys, Primary Keys Transformations Insert, Update, Delete, Tag, Stop Architectual Indexes Custom Custom SQL, Modify SQL, Execution
  • 9. An Example We have a database &quot;meetup&quot;, we want to have two tables: meetup: contains an id, name, description and the date it was created and last updated. event: contains an id, a meetup id, event name, event description and event date.
  • 10. Why LiquiBase over Alternatives XML file makes it easier to read changes and see a history of changes. Support for multiple ChangeLogs Example: Pre-Deployment, Post-Deployment. Run through automated systems. Heavily documented. Project activity.