Thursday, November 13, 2008

Loading Static Data.

I need to have some static data in there for a few of the tables:
  1. bug_columns
  2. bug_tool_urls
  3. ownership_models
  4. site_update_frequencies
There are a lot of options for how to pre-populate data into the DB. I decided to go with YML fixtures because it's just so easy.

I love that any time I need to make a change I just type  

      rake db:fixtures:load

I'm glad to see that I included an application_id for these tables in the schema. [pat self on back] It makes it easier to populate the DB and have foreign key references to these tables without having to worry about how the DB manages the auto generated "id" column.

No comments: