Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Liquibase JFall 2011

Liquibase JFall 2011

Introduction to Liquibase at JFall 2011

Avatar for Daan van Berkel

Daan van Berkel

November 08, 2011

More Decks by Daan van Berkel

Other Decks in Technology

Transcript

  1. Introduction •Daan van Berkel ◦ Married ◦ Child •Experience ◦

    Luminis ◦ Topicus ◦ Sogyo ◦ Ratio http://www.linkedin.com/pub/daan-van-berkel/b/850/573
  2. Anecdote Test Production Update procedure •Software ◦Version Control ◦Continous Build

    ◦War •Database ◦Manually Change Test ◦Record in Script ◦Sent Script
  3. Anecdote Test Production Start using local environment •Common problems ◦Incomplete

    scripts ◦Incomplete installation •Different DB flavour
  4. Antidote: introduction Liquibase •Changelog •Changeset ◦unique (author, id) ◦Semantics •Log

    tables <changeSet id="1" author="dvberkel"> <createTable tableName="message"> <column name="id" type="bigint"> <constraints primaryKey="true"/> </column> <column name="content" type="varchar"/> </createTable> </changeSet>
  5. Antidote: Exploration Supported changes •Structure •Quality •Integrity •Transformation Structural Refactoring

    • Add column • Rename column • Modify column • Drop column • Alter sequence • Create table • Rename table • Drop table • Create view • Rename view • Drop view • Merge columns • Stored procedure
  6. Antidote: Exploration Supported changes •Structure •Quality •Integrity •Transformation Data quality

    •Add lookup table •Add/remove constraint ◦not-null ◦unique •Create sequence •Drop sequence •Add auto-increment •Add default value •Drop default value
  7. Antidote: Evalutation •Database independent •Rich feature set •Process It was

    easy to change the underlying database Wide variety in databases is supported
  8. Antidote: Evalutation •Database indepent •Rich feature set •Process Great number

    of possible changes Multiple options if your change is not present
  9. Antidote: Evalutation •Database independent •Rich feature set •Process ◦Verifiable ◦Repeatable

    ◦Reversable Liquibase offers an ubiquitous language for developers and database administrators
  10. Antidote: Advanced use-cases •Legacy Database •Keeping DBA's Happy •Integration •Extending

    Liquibase Liquibase can generate a changelog from an existing database
  11. Antidote: Advanced use-cases •Legacy Database •Keeping DBA's Happy •Integration •Extending

    Liquibase Various integration options •Commandline •Ant •Maven •Spring •Servlet Listener
  12. Questions Daan van Berkel [email protected] @daan.v.berkel.1980 github.com/dvberkel Slides available at

    http://goo.gl/AuT4s Code available at github dvberkel/jfall2011-liquibase