diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/069_add_what_doing.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 5 |
2 files changed, 16 insertions, 1 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 diff --git a/db/schema.rb b/db/schema.rb index e33f36c38..dd0a70937 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 68) do +ActiveRecord::Schema.define(:version => 69) do create_table "acts_as_xapian_jobs", :force => true do |t| t.string "model", :null => false @@ -93,8 +93,11 @@ ActiveRecord::Schema.define(:version => 68) do t.datetime "updated_at", :null => false t.datetime "last_sent_at" t.integer "incoming_message_followup_id" + t.string "what_doing", :null => false end + add_index "outgoing_messages", ["what_doing"], :name => "index_outgoing_messages_on_what_doing" + create_table "post_redirects", :force => true do |t| t.text "token", :null => false t.text "uri", :null => false |