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

Flyway - Database Migrations Made Easy

Flyway - Database Migrations Made Easy

We all take version control for granted. And it is, when it comes to code. On the database side, however schema evolution is often performed ad-hoc: a quick statement here, a little script there. The result: confusion and uncertainty. Has this update already been applied on this instance? Should we apply this other script first? Is our application going to run against this database?

No more! This is where database migration tools come to the rescue! We'll look at a popular open-source choice called Flyway. By the end of the session, you'll have a solid understanding of what it does, how it works and how to effectively integrate it into your project. We'll look at concepts and solutions. We'll tackle the hard problems and show you how this fits in a Continuous Delivery and Zero Downtime workflow. This will transform how you deal with your database, and you'll never look back.

Axel Fontaine

June 18, 2015
Tweet

More Decks by Axel Fontaine

Other Decks in Technology

Transcript

  1. About Axel Fontaine • Founder and CEO of Boxfuse •

    Over 15 years industry experience • Continuous Delivery expert & trainer • Regular speaker at tech conferences • JavaOne RockStar in 2014 @axelfontaine
  2. Why should you use a relational database ? • ACID

    • Battle-tested reliability • Performance • Scaling up • Slice & dice data • Defer decisions
  3. The secrets of scaling • Buy RAM (it’s cheap!) •

    Keep LOBs out of the DB (only store a reference) • Only then look at techniques like sharding
  4. NoSQL databases are like divas They can be great, but

    you’d better know how to please them
  5. POLL: how are you doing database migrations? • Ad-hoc individual

    statements • Scripts (ad-hoc) • In-house tool (automated) • DB Migration tool • DB Migration API on App startup
  6. APP

  7. APP

  8. SQL

  9. With techniques such as continuous delivery becoming more mainstream, automated

    database migrations are a baseline capability for many software teams. While there are many tools in this space, we continue to recommend Flyway for its low-friction approach. Flyway has a vibrant open-source community behind it, and support for both traditional and cloud-based databases such as Amazon Redshift and Google Cloud SQL. -- ThoughtWorks
  10. VS DML DDL Name Balance Homer 0 Marge 0 Bart

    0 Lisa 0 Name Homer Marge Bart Lisa From a business perspective the risk of DML and DDL is the same
  11. Do you really want to test your code with a

    different query engine from the one you have in production???
  12. Summary • Use a database migration tool • Run it

    on application startup • Get started tomorrow 