about databases 2. Database challenges 3. Why database automation 4. The 1st step: Source Control 5. Migrations vs State 6. Flyway 7. Version Control System Chapter 4: Database
of the times are not both included in the value stream Have different deployment pipelines Database is not included in the deployment pipeline As result, database is out of pace with application development The problem to fix
the required consistency without including infrastructure? If you practice (development) and play (production) in different fields, why do you expect the same behavior/performance? Infrastructure
and provisioning infrastructure Is not simply writing scripts Allows to apply proven software development practices Version control, testing, small deployments Infrastructure as Code (Iac)
pace with application development Lack of traceability of database changes (changes history) Manual databases processes prevent the CI and CD utilization Lack of testability Database setup time for new environments Bugs in production Database challenges
development Increase speed of response to change Keep a versioned “history” of database states and changes Reliability of the release process Increase release frequency though repeatability of processes Reduce time spent fixing bugs - automated tests Remove/reduce human intervention in the release process Why database automation
database deployment pipeline Traceability through change history SQL as documentation Shared code-base and shared process Enforceable standards to reduce conflicts The 1st step: Source Control
represents the current database state Your source of truth is how the database should be Migrations based solutions Script represents a migration Migration represents how to transition to the next database version Your source of truth is how the database should change Migrations vs State
made Easy” http://flywaydb.org/ Open source database migration tool Flyway command-line enabled Simplicity: easy to setup, no need to install Zero dependencies (java + jdbc) Scripts are written in SQL Flyway
info, validate, baseline, repair Metadata table: Used to track the state of the database If the database is empty, flyway won’t find it and will create it Flyway scans the migrations directory and check migrations against the metadata table Migrations are sorted based on their version number and applied in order Flyway: How it works