SlideShare uma empresa Scribd logo
1 de 49
Liquibase for java
developers
By Illia Seleznov
Who am I?
Lead Software Engineer at EPAM Systems
More than 7 years in commercial java development
2 project from scratch to production
Speaker experience at Epam events, Logik Night,
UADEVCLUB.
Why me?
Working with liquibase since 2014
Have used liquibase on 3 projects
Implemented liquibase on 1 project
Liquibase is a part of my dream application
Agenda
How do we work with DB? What do we really need?
Liquibase artifacts
Liquibase commands
Liquibase with maven
Liquibase with Spring Boot
First DB - first decisions
DB script management
DAO testing
Deployment
Types of DB scripts
Scripts that change existing data or structure in DB
Scripts that change existing logic(procedures, views...)
DB management
Create one file with all sql scripts
Create separate files named 1.sql, 2.sql….
Use spring.jpa.hibernate.ddl-auto
Custom tool
DBA will find a solution
DAO tests
Run scripts on test DB
Use existing database, populate it with test data before
test running and clean it after tests running
Use embeded db with predefined test data
Insert test data
Remove test data after test
Deployment
Simple(stop -> backup -> update -> start)
Simple replication
Replication and zero time deployment
Replication
Database migration tools
Liquibase is open sources
Founded in 2006 year
Author is Nathan Voxland
Github: https://github.com/liquibase
Changesets
Changelog
File structure
/db-migrations
/v-1.0
/2013-03-02--01-initial-schema-import.xml
/2013-03-02--02-core-data.xml
/2013-03-04--01-notifications.xml
/changelog-v.1.0-cumulative.xml
/v-2.0
...
/changelog-v.2.0-cumulative.xml
/changelog.xml
ChangeLog formats
XML
JSON
YAML
SQL
Liquibase is just a jar file
liquibase [options] [command] [command parameters]
Example:
java -jar liquibase.jar 
--driver=oracle.jdbc.OracleDriver 
--classpath=pathtoclasses:jdbcdriver.jar 
--changeLogFile=com/example/db.changelog.xml 
--url="jdbc:oracle:thin:@localhost:1521:oracle" 
--username=scott 
--password=tiger 
update
Liquibase.properties file
1.Create liquibase.properties file near liquibase.jar
2.Add all connection data to this file
driver: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3306/shop_db
username: shop
password: qwerty
classpath: /home/illcko/liquibase/dbdrivers/mariadb-java-client-1.4.6.jar
Easy command line
java -jar liquibase.jar --changeLogFile=changelogs/yaml/master.yaml update
java -jar liquibase.jar --changeLogFile=changelogs/json/master.json dropAll
java -jar liquibase.jar --changeLogFile=changelogs/xml/master.xml dropAll
update
Liquibase system tables
Changests
The changeSet tag is what you use to group database
changes/refactorings together.
Example
<databaseChangeLog>
<changeSet id="1" author="bob">
<comment>A sample change log</comment>
<createTable/>
</changeSet>
<changeSet id="2" author="bob" runAlways="true">
<alterTable/>
<createIndex/>
<addPrimaryKey/>
</changeSet>
</databaseChangeLog>
Bundled Changes
ADD AUTO INCREMENT
ADD COLUMN
ADD DEFAULT VALUE
ADD FOREIGN KEY CONSTRAINT
ADD LOOKUP TABLE
ADD NOT NULL CONSTRAINT
ADD PRIMARY KEY
ADD UNIQUE CONSTRAINT
ALTER SEQUENCE
CREATE INDEX
CREATE PROCEDURE
CREATE SEQUENCE
CREATE TABLE
CREATE VIEW
CUSTOM CHANGE
DELETE
DROP ALL FOREIGN KEY
CONSTRAINTS
DROP COLUMN
DROP DEFAULT VALUE
DROP FOREIGN KEY
CONSTRAINT
DROP INDEX
DROP NOT NULL CONSTRAINT
DROP PRIMARY KEY
DROP PROCEDURE
DROP SEQUENCE
DROP TABLE
DROP UNIQUE CONSTRAINT
DROP VIEW
EMPTY
EXECUTE COMMAND
INSERT
LOAD DATA
LOAD UPDATE DATA
MERGE COLUMNS
MODIFY DATA TYPE
RENAME COLUMN
RENAME TABLE
RENAME VIEW
SQL
SQL FILE
STOP
TAG DATABASE
UPDATE
Load data
<loadData encoding="UTF-8" file="config/liquibase/users.csv"
separator=";" tableName="jhi_user">
<column name="activated" type="boolean"/>
</loadData>
id;login;PASSWORD;first_name;last_name;email;activated;lang_key;created_by
1;system;123;System;System;system@localhost;true;en;system
2;123;Anonymous;User;anonymous@localhost;true;en;system
SQL also here
SQL as changelog file
Include sql file
SQL tag in changeset
SQL as changelog file
--liquibase formatted sql
--changeset seleznov:1
create table test1 (
id int primary key,
name varchar(255)
);
--rollback drop table test1;
--changeset seleznov:2
insert into test1 (id, name) values (1, ‘name 1′);
insert into test1 (id, name) values (2, ‘name 2′);
--changeset seleznov:3 dbms:oracle
create sequence seq_test;
SQL as file
<changeSet id="do_smth" author="IlliaSeleznov">
<sqlFile encoding="utf8"
endDelimiter="/"
path="sql/do_smth.sql"
relativeToChangelogFile="true"
splitStatements="true"
stripComments="true"/>
</changeSet>
SQL as part of changeset
<changeSet id="drop_storage_with_index_data" author="Illia_Seleznov" dbms="oracle">
<sql splitStatements="false">
<![CDATA[
DECLARE
filter_count number;
BEGIN
select count(*) into filter_count FROM CTXSYS.CTX_PREFERENCES WHERE PRE_NAME
= '<MNG_STORAGE>' AND PRE_OWNER in (select user from dual);
IF filter_count > 0 THEN
ctx_ddl.drop_preference( ''<MNG_STORAGE>');
END IF;
END;
]]>
</sql>
</changeSet>
Custom change
<customChange class="com.seleznov.liquibase.example.CustomProcessor">
<param name="relativePath" value="example.json"/>
</customChange>
interface CustomTaskChange extends CustomChange {
String getConfirmationMessage();
void setUp() throws SetupException;
void setFileOpener(ResourceAccessor var1);
ValidationErrors validate(Database var1);
void execute(Database var1) throws CustomChangeException;
}
Changeset attributes
id
author
runAlways
runOnChange
context
failOnError
Contexts
context=”!test”
context=”v1.0 or map”
context=”!qa and !master”
“test, qa” is the same as “test OR qa”
“test, qa and master” is the same as “(test) OR (qa and
master)
Why does not devops sleep?
Sub-tags
comments
preConditions
validCheckSum(not recommended)
rollback
Preconditions
<changeSet id="1" author="bob">
<preConditions onError="MARK_RAN">
<tableExists tableName="angry_devops"/>
</preConditions>
<comment>Comments should go after preCondition. If they are before then liquibase usually gives
error.</comment>
<createTable tableName="angry_devops">
<column name="angry" type="int"/>
</createTable>
</changeSet>
AND/OR/NOT Logic
<preConditions>
<or>
<and>
<dbms type="oracle" />
<runningAs username="SYSTEM" />
</and>
<and>
<dbms type="mssql" />
<runningAs username="sa" />
</and>
</or>
</preConditions>
Available Preconditions
<dbms>
<runningAs>
<changeSetExecuted>
<columnExists>
<tableExists>
<viewExists>
<foreignKeyConstraintExists>
<indexExists>
<sequenceExists>
<primaryKeyExists>
<sqlCheck>
<changeLogPropertyDefined>
<customPrecondition>
Liquibase commands
Update
Rollback
Diff
Documentation
Maintenance
Update commands
update - updates database to current version
updateCount <value> - applies the next <value> change sets
updateSQL - writes SQL to update database to current version to STDOUT
updateCountSQL <value> - writes SQL to apply the next <value> change sets
to STDOUT
Diff commands
diff [diff parameters] - writes description of differences to standard out
diffChangeLog [diff parameters] - writes Change Log XML to update the base database to the target
database to standard out
Include:
● Version Differences
● Missing/unexpected tables
● Missing/unexpected views
● Missing/unexpected columns
● Missing/unexpected primary keys
● Missing/unexpected unique constraints
● Missing/unexpected foreign Keys
● Missing/unexpected sequences
● Missing/unexpected indexes
● Column definition differences (data type,
auto-increment, etc.)
● View definition differences
● Data differences (limited), not checked by
default
Exclude:
● Non-foreign key constraints (check, etc)
● Stored Procedures
● Data type length
Documentation commands
dbDoc <outputDirectory> - generates Javadoc-like
documentation based on current database and change log.
java -jar liquibase.jar --changeLogFile=changelogs/xml/master.xml dbDoc ../doc
Maintenance commands
tag <tag> - "tags" the current database state for future rollback.
tagExists <tag> - Checks whether the given tag is already existing.
status - Outputs count (list if --verbose) of unrun change sets.
validate - checks the changelog for errors.
changelogSync - mark all changes as executed in the database.
changelogSyncSQL - writes SQL to mark all changes as executed in the database to STDOUT.
markNextChangeSetRan - mark the next change set as executed in the database.
listLocks - lists who currently has locks on the database changelog.
releaseLocks - Releases all locks on the database changelog.
dropAll - Drops all database objects owned by the user. Note that functions, procedures and packages are not dropped
(limitation in 1.8.1).
clearCheckSums - Removes current checksums from database. On next run checksums will be recomputed.
generateChangeLog - generateChangeLog of the database to standard out. v1.8 requires the dataDir parameter
currently.
Rollback commands
rollback <tag> - rolls back the database to the state it was in when the tag was applied.
rollbackToDate <date/time> - rolls back the database to the state it was in at the given date/time.
rollbackCount <value> - rolls back the last <value> change sets.
rollbackSQL <tag> - writes SQL to roll back the database to the state it was in when the tag was applied
to STDOUT.
rollbackToDateSQL <date/time> - writes SQL to roll back the database to the state it was in at the
given date/time version to STDOUT.
rollbackCountSQL <value> - writes SQL to roll back the last <value> change sets to STDOUT.
futureRollbackSQL - writes SQL to roll back the database to the current state after the changes in the
changeslog have been applied.
updateTestingRollback - updates the database, then rolls back changes before updating again.
RollBack
<changeset id="init-1" author="illia_seleznov">
<insert tablename="Person">
<column name="name" value="John Doe">
</column>
</insert>
<rollback>
DELETE FROM Person WHERE name LIKE 'John Doe';
</rollback>
</changeset>
Liquibase maven plugin
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<propertyFile>src/main/resources/liquibase/liquibase.properties</propertyFile>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
Execute maven liquibase command
mvn liquibase:command
profile with liquibase plugin
Liquibase with Spring-boot
Add liquibase dependency to pom
Add master changelog location to properties
Something to read
https://liquibase.jira.com/wiki/display/CONTRIB/LiquiBa
se+Extensions+Portal
https://habrahabr.ru/post/178665/
https://habrahabr.ru/post/179425/
https://habrahabr.ru/post/251617/
Contacts
https://github.com/manbe/liquibase-demo
manbe@mail.com
https://www.facebook.com/IlliaSeleznov

Mais conteúdo relacionado

Mais procurados

Oracle Application Testing Suite. Competitive Edge
Oracle Application Testing Suite. Competitive EdgeOracle Application Testing Suite. Competitive Edge
Oracle Application Testing Suite. Competitive EdgeMaija Laksa
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & ActuatorsVMware Tanzu
 
Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019Laurent Guérin
 
Android Developer JeongJaeyun
Android Developer JeongJaeyunAndroid Developer JeongJaeyun
Android Developer JeongJaeyunjaeyunjeong1
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessibleVictor Trakhtenberg
 
Hacking Jenkins
Hacking JenkinsHacking Jenkins
Hacking JenkinsMiro Cupak
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesVMware Tanzu
 
Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)
Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)
Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)Taoufik AIT HSAIN
 

Mais procurados (20)

Oracle Application Testing Suite. Competitive Edge
Oracle Application Testing Suite. Competitive EdgeOracle Application Testing Suite. Competitive Edge
Oracle Application Testing Suite. Competitive Edge
 
Java Spring
Java SpringJava Spring
Java Spring
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019
 
Android Developer JeongJaeyun
Android Developer JeongJaeyunAndroid Developer JeongJaeyun
Android Developer JeongJaeyun
 
Webpack slides
Webpack slidesWebpack slides
Webpack slides
 
spring-api-rest.pdf
spring-api-rest.pdfspring-api-rest.pdf
spring-api-rest.pdf
 
React
React React
React
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessible
 
Hacking Jenkins
Hacking JenkinsHacking Jenkins
Hacking Jenkins
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
React - Introdução
React - IntroduçãoReact - Introdução
React - Introdução
 
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native ImagesRunning Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)
Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)
Obiee 11.1.7.0 step by step installation on linux (rhel – red hat)
 
Docker
DockerDocker
Docker
 
React js
React jsReact js
React js
 
Selenium
SeleniumSelenium
Selenium
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Jenkins
JenkinsJenkins
Jenkins
 

Semelhante a Liquibase for java developers

Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with LiquibaseIllia Seleznov
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Liquibase migration for data bases
Liquibase migration for data basesLiquibase migration for data bases
Liquibase migration for data basesRoman Uholnikov
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
Advance java session 5
Advance java session 5Advance java session 5
Advance java session 5Smita B Kumar
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your dataNeev Technologies
 
Liquibase få kontroll på dina databasförändringar
Liquibase   få kontroll på dina databasförändringarLiquibase   få kontroll på dina databasförändringar
Liquibase få kontroll på dina databasförändringarSqueed
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under controlMarcin Przepiórowski
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission processK Kumar Guduru
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slidesmetsarin
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012Eduardo Castro
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productionsOsama Mustafa
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesSperasoft
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptxLadduAnanu
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsAndrei Solntsev
 

Semelhante a Liquibase for java developers (20)

Database versioning with liquibase
Database versioning with liquibaseDatabase versioning with liquibase
Database versioning with liquibase
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with Liquibase
 
Liquibase
LiquibaseLiquibase
Liquibase
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Liquibase migration for data bases
Liquibase migration for data basesLiquibase migration for data bases
Liquibase migration for data bases
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Advance java session 5
Advance java session 5Advance java session 5
Advance java session 5
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
 
Liquibase få kontroll på dina databasförändringar
Liquibase   få kontroll på dina databasförändringarLiquibase   få kontroll på dina databasförändringar
Liquibase få kontroll på dina databasförändringar
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission process
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productions
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 
Sql optimize
Sql optimizeSql optimize
Sql optimize
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptx
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOps
 

Último

NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 

Último (20)

NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

Liquibase for java developers

Notas do Editor

  1. java -jar liquibase.jar --changeLogFile=changelogs/yaml/master.yaml update java -jar liquibase.jar --changeLogFile=changelogs/json/master.json update
  2. java -jar liquibase.jar --changeLogFile=changelogs/yaml/master.yaml update java -jar liquibase.jar --changeLogFile=changelogs/json/master.json update java -jar liquibase.jar --changeLogFile=changelogs/xml/master.xml update
  3. mvn liquibase:update -Dliquibase.contexts=test
  4. java -jar liquibase.jar --driver=org.mariadb.jdbc.Driver --url=jdbc:mariadb://localhost:3306/liquibase_2 --username=liquibase --referencePassword=qwerty diffChangeLog --referenceUrl=jdbc:mariadb://localhost:3306/liquibase_demo --referenceUsername=liquibase --referencePassword=qwerty > diff.sql
  5. java -jar liquibase.jar --changeLogFile=changelogs/xml/master.xml dbDoc ../doc
  6. java -jar liquibase.jar --changeLogFile=changelogs/xml/master.xml rollbackCount 1
  7. java -jar liquibase.jar --changeLogFile=changelogs/xml/master.xml rollbackCount 1