migrate labels to stars

test plan:

confirm that a previously labeled conversation is now starred, and that
they save without any errors

Change-Id: I36fab3f0406318fc2dd259c6db4f2da96cde9a48
Reviewed-on: https://gerrit.instructure.com/8330
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
This commit is contained in:
Jon Jensen 2012-01-26 13:49:27 -07:00
parent e3bd30e3a0
commit 1a61b5c4ec
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class LabelsToStars < ActiveRecord::Migration
def self.up
ConversationParticipant.update_all("label = 'starred'", "label IS NOT NULL")
end
def self.down
raise ActiveRecord::IrreversibleMigration
end
end