Skip to content

Commit

Permalink
story-status-model-migration-edit
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bryanlarsen authored and iox committed Aug 12, 2013
1 parent fdf875d commit 11d28a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/migrate/20130109022053_add_story_status_model.rb
Expand Up @@ -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
Expand Down

0 comments on commit 11d28a0

Please sign in to comment.