Recipe 12Naming Upgrade Scripts

Problem: What's the best strategy for naming upgrade scripts?

When a database is being changed, how do you make sure you have scripts to upgrade environments such as UAT and production? These environments can't afford to lose data. Upgrade scripts should also be tested before they are applied to other environments.

Solution

Refactoring Databases: Evolutionary Database Design discussed three strategies for identifying refactorings: BuildNumber, TimeStamp, and UniqueIdentifier. In addition, when a mature application doesn't require many database changes, you can use release-level naming. This strategy is called Release. Naming of upgrade scripts or change scripts is important when database changes depend on the previous ...

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.