SlideShare a Scribd company logo
Migrations for Java
                       EVOLUINDO SEU BANCO DE MANEIRA INCREMENTAL




Monday, May 14, 2012
Como você evolui sua
                                    APP?
Monday, May 14, 2012
Como você evolui seu
                                BANCO?
Monday, May 14, 2012
gerencia mudanças
                       Como você evolui seu
                                 BANCO?
Monday, May 14, 2012
PREPARA UM HUGE_SCRIPT.SQL E
                          APLICA MANUALMENTE?



Monday, May 14, 2012
DEIXA NA MÃO DO DBA?




Monday, May 14, 2012
DEIXA NA MÃO DO
                       *
                         ARQUITETO?

                                         * BDUF (Big Design Up Front)

Monday, May 14, 2012
NÓS
                                        ♥
                                            TECN
                                                OLO
                                                   GIA
                                                       CASE
                         CRIA SUA PRÓPRIA                   IRA



                       FERRAMENTA, CERTO?


Monday, May 14, 2012
Não importa qual solução
     você utilize...



Monday, May 14, 2012
CADA SOLUÇÃO
                          TEM VANTAGENS
                       E DESVANTAGENS


Monday, May 14, 2012
CADA SOLUÇÃO
                        TEM SEUS PRÓS
                       E CONTRAS


Monday, May 14, 2012
A COMUNIDADE RUBYONRAILS APRENDEU DESDE O COMEÇO




Monday, May 14, 2012
SIMPLES E EFICAZ:

     MIGRATIONS
Monday, May 14, 2012
A COMUNIDADE JAVA
                       PARECE QUE NÃO APRENDEU
                       AINDA COMO SE FAZ


Monday, May 14, 2012
Java              ferramentas para todos os gostos




Monday, May 14, 2012
Java              ferramentas para todos os gostos




                           mybatis


Monday, May 14, 2012
MyBatis Schema Migrations




Monday, May 14, 2012
INSTALAÇÃO É SIMPLES

Monday, May 14, 2012
instalando MyBatis Migrations | download & unzip

   [rponte]	
  ~/Development/tools
   $	
  unzip	
  mybatis-­‐3.0.6-­‐migrations.zip	
  	
  


   [rponte]	
  ~/Development/tools
   $	
  ls	
  -­‐l	
  mybatis-­‐migrations-­‐3.0.6
   total	
  536
   -­‐rw-­‐r-­‐-­‐r-­‐-­‐@	
  1	
  rponte	
  	
  staff	
  	
  	
  11560	
  Oct	
  	
  9	
  	
  2011	
  LICENSE
   -­‐rw-­‐r-­‐-­‐r-­‐-­‐@	
  1	
  rponte	
  	
  staff	
  	
  	
  	
  2051	
  Oct	
  	
  9	
  	
  2011	
  MIGRATIONS-­‐README
   -­‐rw-­‐r-­‐-­‐r-­‐-­‐@	
  1	
  rponte	
  	
  staff	
  	
  253003	
  Oct	
  	
  9	
  	
  2011	
  MyBatis-­‐3-­‐Migrations.pdf
   -­‐rw-­‐r-­‐-­‐r-­‐-­‐@	
  1	
  rponte	
  	
  staff	
  	
  	
  	
  2519	
  Oct	
  	
  9	
  	
  2011	
  NOTICE
   drwxrwxrwx	
  	
  5	
  rponte	
  	
  staff	
  	
  	
  	
  	
  170	
  May	
  11	
  02:45	
  bin
   drwxrwxrwx	
  	
  3	
  rponte	
  	
  staff	
  	
  	
  	
  	
  102	
  Oct	
  	
  9	
  	
  2011	
  lib




Monday, May 14, 2012
instalando MyBatis Migrations | environment

   [rponte]	
  ~/Development/tools
   $	
  export	
  PATH=$MIGRATIONS_HOME/bin:$PATH	
  	
  


   [rponte]	
  ~/Development/tools
   $	
  migrate	
  -­‐-­‐help
   Commands:
   	
  	
  init	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Creates	
  (if	
  necessary)	
  and	
  initializes	
  a	
  migration	
  path.
   	
  	
  bootstrap	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Runs	
  the	
  bootstrap	
  SQL	
  script	
  (see	
  scripts/bootstrap.sql	
  for	
  more).
   	
  	
  new	
  <description>	
  	
  Creates	
  a	
  new	
  migration	
  with	
  the	
  provided	
  description.
   	
  	
  up	
  [n]	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Run	
  unapplied	
  migrations,	
  ALL	
  by	
  default,	
  or	
  'n'	
  specified.
   	
  	
  down	
  [n]	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Undoes	
  migrations	
  applied	
  to	
  the	
  database.	
  ONE	
  by	
  default	
  or	
  'n'	
  specified.
   	
  	
  version	
  <version>	
  	
  Migrates	
  the	
  database	
  up	
  or	
  down	
  to	
  the	
  specified	
  version.
   	
  	
  pending	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Force	
  executes	
  pending	
  migrations	
  out	
  of	
  order	
  (not	
  recommended).
   	
  	
  status	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Prints	
  the	
  changelog	
  from	
  the	
  database	
  if	
  the	
  changelog	
  table	
  exists.
   	
  	
  script	
  <v1>	
  <v2>	
  	
  	
  Generates	
  a	
  delta	
  migration	
  script	
  from	
  version	
  v1	
  to	
  v2	
  (undo	
  if	
  v1	
  >	
  v2).




Monday, May 14, 2012
instalando MyBatis Migrations | project
   [rponte]	
  ~/Development/blog_project/db
   $	
  migrate	
  init




Monday, May 14, 2012
MyBatis Migrations
                    em ação...
Monday, May 14, 2012
PODEMOS FACILITAR
                          E FOI O QUE FIZEMOS
                       ANT SCRIPT
Monday, May 14, 2012
Monday, May 14, 2012
Mybatis-Migrations-Anttasks   github.com/triadworks/labs




Monday, May 14, 2012
Mybatis-Migrations-Anttasks   github.com/triadworks/labs




Monday, May 14, 2012
Monday, May 14, 2012
MyBatis Migrations
                   Ant-tasks em
                      ação...
Monday, May 14, 2012
Rafael Ponte
                       rponte@triadworks.com.br




Monday, May 14, 2012

More Related Content

PDF
Just Java 2006 - Qualidade em Desenvolvimento Java para todos os gostos - Dan...
PDF
Migrations for Java (Javou #4 - JavaCE)
PDF
Innovate, Learn, Deliver: Staying ahead in turbulent times
PDF
Diseño de APIs con Ruby
PDF
Feb. 2012 Techmeetups V2
PDF
Waza keynote: Idea to Delivery
PDF
Facebook Timeline for Fan Pages: Overview
PPTX
Unleashing the power of Scrum and Kanban together - Best of Both Worlds!!
Just Java 2006 - Qualidade em Desenvolvimento Java para todos os gostos - Dan...
Migrations for Java (Javou #4 - JavaCE)
Innovate, Learn, Deliver: Staying ahead in turbulent times
Diseño de APIs con Ruby
Feb. 2012 Techmeetups V2
Waza keynote: Idea to Delivery
Facebook Timeline for Fan Pages: Overview
Unleashing the power of Scrum and Kanban together - Best of Both Worlds!!

Similar to Migrations for Java (20)

PDF
Games for the Masses (QCon London 2012)
PDF
NERCOMP LMS UnConference UnKeynote
KEY
Jenkins Evolutions
PDF
PFCongres 2012 - Rock Solid Deployment of PHP Apps
PDF
Welcome to Rails Girls Buenos Aires
PDF
Como escalar aplicações PHP
PDF
鱼与熊掌 - 软件质量和交付速度
PDF
HTML5 Italy: Back end ecosystems for your applications - Cesare Rocchi + Clau...
PDF
Facebook Timeline for Church Fan Pages: An Overview
PDF
StartupWeekend slide deck
PDF
Going independent - making it as a freelance web professional - TriNUD RDU Co...
PDF
Show an Open Source Project Some Love and Start Using Travis-CI
PPT
Multilingual solutions florian loretan
PPTX
The enterprise mobility revolution
PDF
Ux in dm d4=r1
PDF
Resume 2016
PDF
Building an app across 11 arabic countries
PDF
Atooma, dall’App alla Community.
PDF
Orientação a objetos v2
Games for the Masses (QCon London 2012)
NERCOMP LMS UnConference UnKeynote
Jenkins Evolutions
PFCongres 2012 - Rock Solid Deployment of PHP Apps
Welcome to Rails Girls Buenos Aires
Como escalar aplicações PHP
鱼与熊掌 - 软件质量和交付速度
HTML5 Italy: Back end ecosystems for your applications - Cesare Rocchi + Clau...
Facebook Timeline for Church Fan Pages: An Overview
StartupWeekend slide deck
Going independent - making it as a freelance web professional - TriNUD RDU Co...
Show an Open Source Project Some Love and Start Using Travis-CI
Multilingual solutions florian loretan
The enterprise mobility revolution
Ux in dm d4=r1
Resume 2016
Building an app across 11 arabic countries
Atooma, dall’App alla Community.
Orientação a objetos v2
Ad

More from Rafael Ponte (20)

PDF
TechDay: 10 Features do Oracle que voce nao conhecia - CONNECT BY CLAUSE
PDF
TechDay Retrospectiva 2018
PDF
Arquitetura Java - Escalando além do Hype
PDF
Como treinar seu estagiario
PDF
Lidando com o Caos: Testando Código PLSQL em um Projeto Critico
PDF
Como Apresentar Codigo em Slides - Javou #7 - 2016
PDF
Importancia dos Testes Automatizados no dia a dia FIC-Estacio 2015
PDF
Hibernate efetivo (IA-2014 / Disturbing the Mind)
PDF
Hibernate efetivo (COALTI-2014 / ALJUG)
PDF
Migrations for Java (QCONSP2013)
PDF
Importancia dos Testes Automatizados no dia a dia (Don't Panic)
PDF
Importância dos testes automatizados no dia a dia
PDF
Hibernate Efetivo (QCONSP-2012)
PDF
Os 10 maus habitos dos desenvolvedores jsf (JustJava e CCT)
PDF
Importância dos testes automatizadoss
KEY
Greenbar - Testes automatizados na sua empresa
PDF
Desafios de um desenvolvedor JSF
PDF
Curso de Java server faces (JSF)
PDF
Os 10 maus hábitos dos desenvolvedores JSF
PDF
Boas Práticas com JavaServer Faces (Jsf)
TechDay: 10 Features do Oracle que voce nao conhecia - CONNECT BY CLAUSE
TechDay Retrospectiva 2018
Arquitetura Java - Escalando além do Hype
Como treinar seu estagiario
Lidando com o Caos: Testando Código PLSQL em um Projeto Critico
Como Apresentar Codigo em Slides - Javou #7 - 2016
Importancia dos Testes Automatizados no dia a dia FIC-Estacio 2015
Hibernate efetivo (IA-2014 / Disturbing the Mind)
Hibernate efetivo (COALTI-2014 / ALJUG)
Migrations for Java (QCONSP2013)
Importancia dos Testes Automatizados no dia a dia (Don't Panic)
Importância dos testes automatizados no dia a dia
Hibernate Efetivo (QCONSP-2012)
Os 10 maus habitos dos desenvolvedores jsf (JustJava e CCT)
Importância dos testes automatizadoss
Greenbar - Testes automatizados na sua empresa
Desafios de um desenvolvedor JSF
Curso de Java server faces (JSF)
Os 10 maus hábitos dos desenvolvedores JSF
Boas Práticas com JavaServer Faces (Jsf)
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Approach and Philosophy of On baking technology
PDF
KodekX | Application Modernization Development
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Electronic commerce courselecture one. Pdf
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Big Data Technologies - Introduction.pptx
Spectroscopy.pptx food analysis technology
Unlocking AI with Model Context Protocol (MCP)
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Programs and apps: productivity, graphics, security and other tools
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Electronic commerce courselecture one. Pdf

Migrations for Java

  • 1. Migrations for Java EVOLUINDO SEU BANCO DE MANEIRA INCREMENTAL Monday, May 14, 2012
  • 2. Como você evolui sua APP? Monday, May 14, 2012
  • 3. Como você evolui seu BANCO? Monday, May 14, 2012
  • 4. gerencia mudanças Como você evolui seu BANCO? Monday, May 14, 2012
  • 5. PREPARA UM HUGE_SCRIPT.SQL E APLICA MANUALMENTE? Monday, May 14, 2012
  • 6. DEIXA NA MÃO DO DBA? Monday, May 14, 2012
  • 7. DEIXA NA MÃO DO * ARQUITETO? * BDUF (Big Design Up Front) Monday, May 14, 2012
  • 8. NÓS ♥ TECN OLO GIA CASE CRIA SUA PRÓPRIA IRA FERRAMENTA, CERTO? Monday, May 14, 2012
  • 9. Não importa qual solução você utilize... Monday, May 14, 2012
  • 10. CADA SOLUÇÃO TEM VANTAGENS E DESVANTAGENS Monday, May 14, 2012
  • 11. CADA SOLUÇÃO TEM SEUS PRÓS E CONTRAS Monday, May 14, 2012
  • 12. A COMUNIDADE RUBYONRAILS APRENDEU DESDE O COMEÇO Monday, May 14, 2012
  • 13. SIMPLES E EFICAZ: MIGRATIONS Monday, May 14, 2012
  • 14. A COMUNIDADE JAVA PARECE QUE NÃO APRENDEU AINDA COMO SE FAZ Monday, May 14, 2012
  • 15. Java ferramentas para todos os gostos Monday, May 14, 2012
  • 16. Java ferramentas para todos os gostos mybatis Monday, May 14, 2012
  • 19. instalando MyBatis Migrations | download & unzip [rponte]  ~/Development/tools $  unzip  mybatis-­‐3.0.6-­‐migrations.zip     [rponte]  ~/Development/tools $  ls  -­‐l  mybatis-­‐migrations-­‐3.0.6 total  536 -­‐rw-­‐r-­‐-­‐r-­‐-­‐@  1  rponte    staff      11560  Oct    9    2011  LICENSE -­‐rw-­‐r-­‐-­‐r-­‐-­‐@  1  rponte    staff        2051  Oct    9    2011  MIGRATIONS-­‐README -­‐rw-­‐r-­‐-­‐r-­‐-­‐@  1  rponte    staff    253003  Oct    9    2011  MyBatis-­‐3-­‐Migrations.pdf -­‐rw-­‐r-­‐-­‐r-­‐-­‐@  1  rponte    staff        2519  Oct    9    2011  NOTICE drwxrwxrwx    5  rponte    staff          170  May  11  02:45  bin drwxrwxrwx    3  rponte    staff          102  Oct    9    2011  lib Monday, May 14, 2012
  • 20. instalando MyBatis Migrations | environment [rponte]  ~/Development/tools $  export  PATH=$MIGRATIONS_HOME/bin:$PATH     [rponte]  ~/Development/tools $  migrate  -­‐-­‐help Commands:    init                              Creates  (if  necessary)  and  initializes  a  migration  path.    bootstrap                    Runs  the  bootstrap  SQL  script  (see  scripts/bootstrap.sql  for  more).    new  <description>    Creates  a  new  migration  with  the  provided  description.    up  [n]                          Run  unapplied  migrations,  ALL  by  default,  or  'n'  specified.    down  [n]                      Undoes  migrations  applied  to  the  database.  ONE  by  default  or  'n'  specified.    version  <version>    Migrates  the  database  up  or  down  to  the  specified  version.    pending                        Force  executes  pending  migrations  out  of  order  (not  recommended).    status                          Prints  the  changelog  from  the  database  if  the  changelog  table  exists.    script  <v1>  <v2>      Generates  a  delta  migration  script  from  version  v1  to  v2  (undo  if  v1  >  v2). Monday, May 14, 2012
  • 21. instalando MyBatis Migrations | project [rponte]  ~/Development/blog_project/db $  migrate  init Monday, May 14, 2012
  • 22. MyBatis Migrations em ação... Monday, May 14, 2012
  • 23. PODEMOS FACILITAR E FOI O QUE FIZEMOS ANT SCRIPT Monday, May 14, 2012
  • 25. Mybatis-Migrations-Anttasks github.com/triadworks/labs Monday, May 14, 2012
  • 26. Mybatis-Migrations-Anttasks github.com/triadworks/labs Monday, May 14, 2012
  • 28. MyBatis Migrations Ant-tasks em ação... Monday, May 14, 2012
  • 29. Rafael Ponte rponte@triadworks.com.br Monday, May 14, 2012