220 likes | 350 Vues
Discover practical strategies for database version control and migration management. In today's development environment, managing changes such as new procedures, dropped tables, and schema modifications can be challenging. This guide examines best practices for automated migrations, effective use of version control systems, and continuous integration tools. Learn about the importance of tracking changes, addressing database modifications, and ensuring smooth releases, even under tight deadlines. Master how to keep your database in sync with application code and improve development workflows.
E N D
Taming the Database Database Version Control
Wes McClure @g0t4 wmcclure@phxwg.com wes.mcclure@gmail.com geekswithblogs.net/wesm tsqlmigrations.codeplex.com
What the _ is this column? Unknown Changes
Hey who dropped that table?Who changed my test data? Shared dev DB
Time to release, where are the changes? MANY versions of the “Truth”
Hey who added a new procedure to production? Production artifacts
Friday night: I can’t go out I have to do a release at midnight Manual Deploy
Because you wouldn’t dream of sharing the same code checkout… Pattern: Local Dev DB
Why am I going bald? End of release diff-athon
YSOD Untested Changes
Excuses Telecommuting is Painful
Heaven Pattern: Automated Migrations
Migrations • Baseline • SchemaChanges • Going forward • Change script • Commit
Or local? Shared Dev DB?
Commit with code into VCS Road blocked team member End of release Never When Do you Address Database changes?
Add Procedure CREATE PROCEDURE GetCustomerNames AS BEGIN SET NOCOUNT ON; SELECT Id, CompanyName from Customers END