aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate/069_add_what_doing.rb
diff options
context:
space:
mode:
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