aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/082_change_raw_email_to_binary.rb15
-rw-r--r--db/schema.rb13
2 files changed, 22 insertions, 6 deletions
diff --git a/db/migrate/082_change_raw_email_to_binary.rb b/db/migrate/082_change_raw_email_to_binary.rb
new file mode 100644
index 000000000..2bcceee88
--- /dev/null
+++ b/db/migrate/082_change_raw_email_to_binary.rb
@@ -0,0 +1,15 @@
+class ChangeRawEmailToBinary < ActiveRecord::Migration
+ def self.up
+ change_column :raw_emails, :data, :binary, :null => true
+ rename_column(:raw_emails, :data, :data_text)
+ add_column :raw_emails, :data_binary, :binary
+ end
+
+ def self.down
+ 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 50adde788..c0782ac1d 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 => 81) do
+ActiveRecord::Schema.define(:version => 82) do
create_table "acts_as_xapian_jobs", :force => true do |t|
t.string "model", :null => false
@@ -193,17 +193,18 @@ ActiveRecord::Schema.define(:version => 81) do
end
create_table "raw_emails", :force => true do |t|
- t.text "data", :null => false
+ t.text "data_text"
+ t.binary "data_binary"
end
create_table "track_things", :force => true do |t|
- t.integer "tracking_user_id", :null => false
- t.string "track_query", :null => false
+ t.integer "tracking_user_id", :null => false
+ t.string "track_query", :null => false
t.integer "info_request_id"
t.integer "tracked_user_id"
t.integer "public_body_id"
- t.string "track_medium", :null => false
- t.string "track_type", :null => false
+ t.string "track_medium", :null => false
+ t.string "track_type", :default => "internal_error", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end