views:

32

answers:

1

I plan on using a "base script" for my initial database version 1.0.0 but after that I will require change scripts which "upgrade" the database to newer versions. I'm not sure how to name these scripts in my repository.

I was envisioning something along the lines of:

  • Baseline-6.0.0.sql
  • Patch-6.0.1.sql
  • Patch-6.0.2.sql
  • Patch-6.1.0.sql

What is a good naming convention to use and why?

+2  A: 

Rails uses timestamped migration files. Each file starts off with a database-style timestamp followed by a short description: 20080717013526_your_migration_name.rb. This ensures they show up in order and give you information about what the migration actually does. It's just one approach, but I think it works well.

Skilldrick
What would be an example of a migration name?
Joe Philllips
`add_client_id_to_projects`, `create_products_table` for example.
Skilldrick