Recipe 3Using Version Control for Your Database

Problem: The application doesn't work after production deployment because someone forgot to send his changes to the database team

The classic problem in database development is finding out what changed between two releases and creating a script to migrate your production database to the new release. Often you find that migration scripts aren't well developed and are missing information, which makes your production deployment prone to problems and errors.

Solution

SQL scripts for creating database objects should be put under version control along with scripts that create tables, views, sequences, triggers, stored procedures, indexes, and insert statements to populate setup data (seed, reference, ...

Get Recipes for Continuous Database Integration: Evolutionary Database Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.