aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/092_cache_only_marked_body_text.rb13
-rw-r--r--db/schema.rb5
2 files changed, 16 insertions, 2 deletions
diff --git a/db/migrate/092_cache_only_marked_body_text.rb b/db/migrate/092_cache_only_marked_body_text.rb
new file mode 100644
index 000000000..e05e23e74
--- /dev/null
+++ b/db/migrate/092_cache_only_marked_body_text.rb
@@ -0,0 +1,13 @@
+class CacheOnlyMarkedBodyText < ActiveRecord::Migration
+ def self.up
+ remove_column :incoming_messages, :cached_main_body_text
+ add_column :incoming_messages, :cached_main_body_text_folded, :text
+ add_column :incoming_messages, :cached_main_body_text_unfolded, :text
+ end
+
+ def self.down
+ #add_column :incoming_messages, :cached_main_body_text, :text
+ #remove_column :incoming_messages, :cached_main_body_text_marked
+ raise "safer not to have reverse migration scripts, and we never use them"
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d0dcead79..0c90be6b1 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 => 91) do
+ActiveRecord::Schema.define(:version => 92) do
create_table "acts_as_xapian_jobs", :force => true do |t|
t.string "model", :null => false
@@ -76,9 +76,10 @@ ActiveRecord::Schema.define(:version => 91) do
t.integer "info_request_id", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.text "cached_main_body_text"
t.integer "raw_email_id", :null => false
t.text "cached_attachment_text_clipped"
+ t.text "cached_main_body_text_folded"
+ t.text "cached_main_body_text_unfolded"
end
create_table "info_request_events", :force => true do |t|