Best practices for database migrations

Simon Wistow simon at thegestalt.org
Mon Nov 18 02:01:22 GMT 2013


Is there a current favourite for doing database migrations (i.e having a 
programatic way for a database to upgraded to a new version by having a 
series of sql commands run on it)?

Some notes:

- We're not using DBIx::Class
- Anything that relies on Moose is almost certainly out unless there's a 
  really compelling reason [*]
- That basically rules out DBIx::VersionedDDL
- I actually prefer the ActiveRecord style of having the 'up' and 'down' 
  actually in the same script 
- I also kind of like being able to invoke a script rather than just 
  have a plain sql file that gets executed although I've never actually 
  needed that functionality so I'm not sure why
- Actually something that was a direct port of ActiveRecord Migrations 
  would be entirely palatable
- Does anybody have any success stories and/or horror stories?
- Is there now some completely different way of doing this stuff that I 
  don't know about? [**]

[*] Although it appears from a quick look that Moose doesn't require a 
substantial proportion of CPAN any more

[**] I fear that someone is going to suggestion expressing the 
transformations as s-expressions or somethin


More information about the london.pm mailing list