2. 3 billion Java developers
lives was ruined on
August 29, 1997
The survivors of the
deployment called the war
Judgment Day.
3. They lived only to face a new
nightmare, the war against the
DBA.
Skynet, the computer which
controlled releases, sent
two engineers back through
time
4. Their mission: to solve
the problems of
schema migrations…
Opening “quote” from “Terminator 2: Judgment Day”
6. And we will have alookinto
thefutureand the
possibilities at hand
7. Roadmap
• Introduction to the topic and why it is so important
• The current situation, the tools of the trade
• Future possibilities at hand to solve this problem
15. change recall refactoring applied some marked specified
better run units the tagged along more SQL precondition pain
state both statements contains production Sets applying
database nested things executes identified context leave test
one management Generally apply HOPE change stable
individual ran database just IT generate fails different
changes uniquely per machines change written
productivity log attribute Set change sets development author
files WORKS Contexts describes by descriptive
someone regardless Major else environments column
queries local Each yet either WORK change ANYMORE set
Preconditions DATABASECHANGELOG unexpected control
file !? Concepts stop store execution arbitrarily location auto
commit executed Developers
16. change recall refactoring applied some marked specified
better run units the tagged along more SQL precondition pain
state both statements contains production Sets applying
database nested things executes identified context leave test
one management Generally apply HOPE change stable
individual ran database just IT generate fails different
changes uniquely per machines change written
productivity log attribute Set change sets development author
files WORKS Contexts describes by descriptive
someone regardless Major else environments column
queries local Each yet either WORK change ANYMORE set
Preconditions DATABASECHANGELOG unexpected control
file !? Concepts stop store execution arbitrarily location auto
commit executed Developers
17. change recall refactoring applied some marked specified
better run units the tagged along more SQL precondition pain
state both statements contains production Sets applying
database nested things executes identified context leave test
one management Generally apply HOPE change stable
individual ran database just IT generate fails different
changes uniquely per machines change written
productivity log attribute Set change sets development author
files WORKS Contexts describes by descriptive
someone regardless Major else environments column
queries local Each yet either WORK change ANYMORE set
Preconditions DATABASECHANGELOG unexpected control
file !? Concepts stop store execution arbitrarily location auto
commit executed Developers
34. change remember refactoring applied some marked
specified better run units the tagged along more SQL
precondition and state both statements contains production
Sets last database nested things executes identified context
leave test one management Generally apply suddenly
change stable individual ran time just a generate fails different
STUFF uniquely per machines change co-worker
productivity log attribute Set change sets development author
files DOES Contexts describes added descriptive NOT
regardless Major a environments column queries local Each
yet either WORK change ANYMORE set Preconditions
DATABASECHANGELOG unexpected control file !? Concepts
stop store execution arbitrarily location auto commit executed
Developers
35. change remember refactoring applied some marked
specified better run units the tagged along more SQL
precondition and state both statements contains production
Sets last database nested things executes identified context
leave test one management Generally apply suddenly
change stable individual ran time just a generate fails different
STUFF uniquely per machines change co-worker
productivity log attribute Set change sets development author
files DOES Contexts describes added descriptive NOT
regardless Major a environments column queries local Each
yet either WORK change ANYMORE set Preconditions
DATABASECHANGELOG unexpected control file !? Concepts
stop store execution arbitrarily location auto commit executed
Developers
36. change remember refactoring applied some marked
specified better run units the tagged along more SQL
precondition and state both statements contains production
Sets last database nested things executes identified context
leave test one management Generally apply suddenly
change stable individual ran time just a generate fails different
STUFF uniquely per machines change co-worker
productivity log attribute Set change sets development author
files DOES Contexts describes added descriptive NOT
regardless Major a environments column queries local Each
yet either WORK change ANYMORE set Preconditions
DATABASECHANGELOG unexpected control file !? Concepts
stop store execution arbitrarily location auto commit executed
Developers
$ git pull
37. change remember refactoring applied some marked
specified better run units the tagged along more SQL
precondition and state both statements contains production
Sets last database nested things executes identified context
leave test one management Generally apply suddenly
change stable individual ran time just a generate fails different
STUFF uniquely per machines change co-worker
productivity log attribute Set change sets development author
files DOES Contexts describes added descriptive NOT
regardless Major a environments column queries local Each
yet either WORK change ANYMORE set Preconditions
DATABASECHANGELOG unexpected control file !? Concepts
stop store execution arbitrarily location auto commit executed
Developers
38. change remember refactoring applied some marked
specified better run units the tagged along more SQL
precondition and state both statements contains production
Sets last database nested things executes identified context
leave test one management Generally apply suddenly
change stable individual ran time just a generate fails different
STUFF uniquely per machines change co-worker
productivity log attribute Set change sets development author
files DOES Contexts describes added descriptive NOT
regardless Major a environments column queries local Each
yet either WORK change ANYMORE set Preconditions
DATABASECHANGELOG unexpected control file !? Concepts
stop store execution arbitrarily location auto commit executed
Developers
102. Database Change Management
Real Life Tricks
• Possible to use on an existing database
• Quick and simple to implement
• Database copies mix and match
• Wash copies of production database
• DBA approval / review process
• One click release possible
105. Tools of the Trade
ActiveRecord Ruby (Ruby)
Entity Framework Migrations (.net)
COMPETITION
HAS IT
106. Tools of the Trade
Hibernate & JPA
Schema Generation
107. Tools of the Trade
FlyWay & Liquibase
Stronger execution order
Supports different DB / environment
Stereotype of being “heavyweight"
Automatic rollback
Convention over configuration
Gaining popularity
108. Tools of the Trade
FlyWay
Convention over configuration
Get up and running in 5 minutes
Gaining popularity
109. Tools of the Trade
Liquibase
Stronger execution order
Supports different DB for different environment
Stereotype of being “heavyweight"
Automatic rollback
110. Use one of the tools Use one of the tools Use one of the
tools Use one of the tools Use one of the tools Use one
of the tools Use one of the tools Use one of the tools Use
one of the tools Use one of the tools Use one of the tools
Use one of the tools Use one of the tools Use one of the
FlyWay & Liquibase
Use one of the tools Use one of the tools Use one of the
tools Use one of the tools Use one of the tools Use one
of the tools Use one of the tools Use one of the tools Use
one of the tools Use one of the tools Use one of the tools
Use one of the tools Use one of the tools Use one of the
tools Use one of the tools Use one of the tools Use one
111. Tools of the Trade
summary
Schema migration is
•Not solved by Java EE today
•Solved by 3PP
•Already in competitors standards
113. Reasons to add Migrations to Java EE
We are behind the competition
Schema migrations is not well know
to the broad developer community
Increased Quality and Productivity
Adding complexity to the platform
120. @Entity
class User {
@Id
long id;
@Column(size="80")
String firstName;
@Column(size="80")
String lastName;
@Column(size="255")
String email;
}
the future?
124. Wrap up
1. Start using one of the tools!
2. We need to figure out if
database migrations is a
candidate to be included in
Java EE
3. Now it the time to take action!