Top Banner
Taming the Database Database Version Control
22

Taming the Database

Feb 23, 2016

Download

Documents

jaimin

Taming the Database. Database Version Control. Wes McClure. @g0t4 [email protected] [email protected] 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. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Taming the Database

Taming the Database

Database Version Control

Page 2: Taming the Database

Wes McClure

@g0t4

[email protected]@gmail.com

geekswithblogs.net/wesmtsqlmigrations.codeplex.com

Page 3: Taming the Database
Page 4: Taming the Database

UNKNOWN CHANGESWhat the _ is this column?

Page 5: Taming the Database

SHARED DEV DB

Hey who dropped that table?Who changed my test data?

Page 6: Taming the Database

MANY VERSIONS OF THE “TRUTH”Time to release, where are the changes?

Page 7: Taming the Database

PRODUCTION ARTIFACTSHey who added a new procedure to production?

Page 8: Taming the Database

MANUAL DEPLOYFriday night: I can’t go out I have to do a release at midnight

Page 9: Taming the Database

PATTERN: LOCAL DEV DBBecause you wouldn’t dream of sharing the same code checkout…

Page 10: Taming the Database

END OF RELEASE DIFF-ATHONWhy am I going bald?

Page 11: Taming the Database

UNTESTED CHANGESYSOD

Page 12: Taming the Database

TELECOMMUTING IS PAINFULExcuses

Page 13: Taming the Database

PATTERN: AUTOMATED MIGRATIONSHeaven

Page 14: Taming the Database

Migrations

• Baseline• SchemaChanges• Going forward– Change script– Commit

Page 15: Taming the Database

Continuous Integration

Page 16: Taming the Database

Automated Deploys

Page 17: Taming the Database

The Whole Picture!

Page 18: Taming the Database

Baseline Schema

Page 19: Taming the Database

SHARED DEV DB?Or local?

Page 20: Taming the Database

WHEN DO YOU ADDRESS DATABASE CHANGES?

Commit with code into VCSRoad blocked team memberEnd of releaseNever

Page 21: Taming the Database

Add Table CustomerTypes

Page 22: Taming the Database

Add Procedure

CREATE PROCEDURE GetCustomerNames ASBEGIN

SET NOCOUNT ON;SELECT Id, CompanyName from Customers

END