aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate/069_add_what_doing.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-11-05 18:19:46 +0000
committerfrancis <francis>2008-11-05 18:19:46 +0000
commitf1a2a5f272f4bb29cb12f11e709599bd2443b60e (patch)
tree6b051abf0b59ad004eca94b8aa75f53e8d07b5ce /db/migrate/069_add_what_doing.rb
parent569ce862d752fb506072d8a54787455ffd76237e (diff)
Lots of the code for internal review state.
Diffstat (limited to 'db/migrate/069_add_what_doing.rb')
-rw-r--r--db/migrate/069_add_what_doing.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/069_add_what_doing.rb b/db/migrate/069_add_what_doing.rb
new file mode 100644
index 000000000..be8039fec
--- /dev/null
+++ b/db/migrate/069_add_what_doing.rb
@@ -0,0 +1,12 @@
+class AddWhatDoing < ActiveRecord::Migration
+ def self.up
+ add_column :outgoing_messages, :what_doing, :string
+ add_index :outgoing_messages, :what_doing
+ OutgoingMessage.update_all "what_doing = 'normal_sort'"
+ change_column :outgoing_messages, :what_doing, :string, :null => false
+ end
+
+ def self.down
+ remove_column :outgoing_messages, :what_doing
+ end
+end