mini training flyway

20
Flyway Database Migrations Made Easy.

Upload: betclic-everest-group-tech-team

Post on 15-Jul-2015

1.043 views

Category:

Software


4 download

TRANSCRIPT

Flyway

Database Migrations Made Easy.

• Objective : database state management

• State ?

– A list of changesets (table, sp, func, db, …)

• How do we know the state of a database at a « t » moment ?

Database migration ?

Database migration ?

State 1 State 2

Database migration : versioning

Version

15.12.4

Version

15.12.15

• Database migration Tools

– In JAVA

– Command line / API

– Use versioning

– Very light

• Work with a list of SQL migration scripts

– Schema update

– Data update

Flyway: http://flywaydb.org/

Flyway – How it works ?

Database

Current version

=> 2.0.1

=> Migrate 2.0.1

Get scripts Migrate

• The flyway table : « schema_version »

Flyway – Database version

• 5 actions

– Migrate

– Clean

– Info

– Validate

– Baseline

Flyway - Actions

Flyway - Migrate

Flyway - Clean

Flyway - Info

Flyway - Validate

Flyway - Baseline

Demo

Benefits

• Work with just a list of migration scripts

• Automatically find which scripts to execute to update the database to a specific version

• Show the next scripts to apply from the current version

• Easy handle of backward compatibility and scheduled obsolescence

Disadvantages

• Java : hard to integrate in a custom .NET application

• Scripts migration error handling is very light

17

Find out more• On https://techblog.betclicgroup.com/

About Us• Betclic Everest Group, one of the world leaders in online

gaming, has a unique portfolio comprising variouscomplementary international brands: Betclic, EverestPoker/Casino, Bet-at-home, Expekt, Imperial Casino, Monte-Carlo Casino…

• Through our brands, Betclic Everest Group places expertise,technological know-how and security at the heart of ourstrategy to deliver an on-line gaming offer attuned to thepassion of our players. We want our brands to be easy to usefor every gamer around the world. We’re building ourcompany to make that happen.

• Active in 100 countries with more than 12 million customersworldwide, the Group is committed to promoting secure andresponsible gaming and is a member of several internationalprofessional associations including the EGBA (EuropeanGaming and Betting Association) and the ESSA (EuropeanSports Security Association).

We want our Sports betting, Poker, Horse racing andCasino & Games brands to be easy to use for everygamer around the world. Code with us to make thathappen.

Look at all the challenges we offer HERE

Check our Employer Page

Follow us on LinkedIn

WE’RE HIRING !