From 11d28a03ee18e9ef64fa18e920dfba2e38ff7db3 Mon Sep 17 00:00:00 2001 From: Bryan Larsen Date: Mon, 3 Jun 2013 16:38:25 +0200 Subject: [PATCH] story-status-model-migration-edit You can always edit the migration before running it. For example you could create some initial story statuses by adding this code to the `self.up` method: SHOW_PATCH --- db/migrate/20130109022053_add_story_status_model.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/migrate/20130109022053_add_story_status_model.rb b/db/migrate/20130109022053_add_story_status_model.rb index 4372ea9..5b05104 100644 --- a/db/migrate/20130109022053_add_story_status_model.rb +++ b/db/migrate/20130109022053_add_story_status_model.rb @@ -10,6 +10,9 @@ def self.up remove_column :stories, :status add_index :stories, [:status_id] + + statuses = %w(new accepted discussion implementation user_testing deployed rejected) + statuses.each { |status| StoryStatus.create :name => status } end def self.down