190 likes | 531 Views
Agile Database Development. Nathan Voxland. You Plan For Your Code To Change. Why Do You Act Like Your Database Doesn’t?. Knee Jerk Reactions:. Plan your Database Up Front Database can only be touched by the anointed DBA ORM/Mapping configuration work- arounds
E N D
Agile Database Development Nathan Voxland
You Plan For Your Code To Change Why Do You Act Like Your Database Doesn’t?
Knee Jerk Reactions: • Plan your Database Up Front • Database can only be touched by the anointed DBA • ORM/Mapping configuration work-arounds • All database access through views and stored procs
Treat Your Database Like Your Code • Build the simplest thing that can possibly work • Refactor • Test changes • Version Control • Branches • Maintainable
The Key to Agile Database Development: Source Control
RedgateSql Compare Compares and Synchronizes SQL Schemas
ActiveRecord::Migration Tracks the current version of the database in the database
LiquiBase The Perfect Solution
What Kind of Changes? • All Changes • New Tables • Modifications to Tables • Reference Data
Lots of Execution Tricks • Update • UpdateSQL • UpdateCount • Rollback • FutureRollbackSQL • GenerateChangeLog • Tag • DBDoc • Diff
Lots of Changelog Flexibility • Database Independence • Modular Changelogs • Contexts • Parameters • Preconditions • Complex Refactorings • Custom Changes
Questions? http://liquibase.org