application development Need of synchronization between development and DBA teams No traceability of database changes (changes history) What changed? Why? When? Who? Manual databases processes prevent the CI and CD utilization in their full extent Database release process is manual Time consuming and error prone Releases are less frequent and risky
exists Bugs in production environment Database related bugs are only discovered after deployment to production Fixes and hotfixes have time cost, what can lead to delay a release Inability to roll back to the previous version of a database Database setup time of a new environment Databases become a bottleneck in agile delivery processes
development Keep a versioned “history” of database sates Increase release frequency though repeatability of processes Greater predictability over releases Efficiency by eliminating the repetition of a range of manual activities Reduce time spent fixing bugs More control, less exposure to error
to change Automated deployment of smaller units of change Remove/reduce human intervention in the release process The build step is automatic triggered by a “push” into source control repository The deploy step is automatic triggered by a successfully build process Greater reliability of the release process Providing a series of automated test stages prior to deployment Maintain an agile development environment
solutions Script 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
migrate, clean 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
– manage multiple branches In other words, is necessary to mange merge/interests conflicts The default branch is the main/master branch and all the merges for this branch must be done with caution Challenge 2 – script expiration date Should the migration script have expiration date? Sometimes, in the next day the migration script makes no sense anymore
– migration scripts stack How can I manage the dependencies between different databases? And how about dependencies between applications/components Challenge 4 – developer sandbox How to supply a disposable development environment where the database is included?