diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/018_add_response_type_to_incoming_message.rb | 18 | ||||
-rw-r--r-- | db/migrate/019_create_rejection_reasons.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 19 |
3 files changed, 42 insertions, 5 deletions
diff --git a/db/migrate/018_add_response_type_to_incoming_message.rb b/db/migrate/018_add_response_type_to_incoming_message.rb new file mode 100644 index 000000000..c841b599a --- /dev/null +++ b/db/migrate/018_add_response_type_to_incoming_message.rb @@ -0,0 +1,18 @@ +class AddResponseTypeToIncomingMessage < ActiveRecord::Migration + def self.up + add_column :incoming_messages, :user_classified, :boolean, :default => false + add_column :incoming_messages, :contains_information, :boolean, :default => false + + create_table :rejection_reasons do |t| + t.column :incoming_message_id, :integer + t.column :reason, :string + t.column :created_at, :datetime + t.column :updated_at, :datetime + end + end + + def self.down + remove_column :incoming_messages, :contains_information + drop_table :rejection_reasons + end +end diff --git a/db/migrate/019_create_rejection_reasons.rb b/db/migrate/019_create_rejection_reasons.rb new file mode 100644 index 000000000..a1c8a4c89 --- /dev/null +++ b/db/migrate/019_create_rejection_reasons.rb @@ -0,0 +1,10 @@ +class CreateRejectionReasons < ActiveRecord::Migration + def self.up + create_table :rejection_reasons do |t| + end + end + + def self.down + drop_table :rejection_reasons + end +end diff --git a/db/schema.rb b/db/schema.rb index 9f05fd4b4..188c180f1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,13 +2,15 @@ # migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. -ActiveRecord::Schema.define(:version => 17) do +ActiveRecord::Schema.define(:version => 18) do create_table "incoming_messages", :force => true do |t| - t.column "info_request_id", :integer - t.column "raw_data", :text - t.column "created_at", :datetime - t.column "updated_at", :datetime + t.column "info_request_id", :integer + t.column "raw_data", :text + t.column "created_at", :datetime + t.column "updated_at", :datetime + t.column "user_classified", :boolean, :default => false + t.column "contains_information", :boolean, :default => false end create_table "info_requests", :force => true do |t| @@ -64,6 +66,13 @@ ActiveRecord::Schema.define(:version => 17) do t.column "last_edit_comment", :string end + create_table "rejection_reasons", :force => true do |t| + t.column "incoming_message_id", :integer + t.column "reason", :string + t.column "created_at", :datetime + t.column "updated_at", :datetime + end + create_table "sessions", :force => true do |t| t.column "session_id", :string t.column "data", :text |