aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/029_add_describe_status_history.rb11
-rw-r--r--db/schema.rb18
2 files changed, 20 insertions, 9 deletions
diff --git a/db/migrate/029_add_describe_status_history.rb b/db/migrate/029_add_describe_status_history.rb
new file mode 100644
index 000000000..0c6095d69
--- /dev/null
+++ b/db/migrate/029_add_describe_status_history.rb
@@ -0,0 +1,11 @@
+class AddDescribeStatusHistory < ActiveRecord::Migration
+ def self.up
+ add_column :info_request_events, :described_state, :string
+ remove_column :info_requests, :described_last_incoming_message_id
+ end
+
+ def self.down
+ remove_column :info_request_events, :described_state
+ add_column :info_requests, :described_last_incoming_message_id, :integer
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 79fdc7e86..6632f5de9 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 => 28) do
+ActiveRecord::Schema.define(:version => 29) do
create_table "incoming_messages", :force => true do |t|
t.integer "info_request_id", :null => false
@@ -24,17 +24,17 @@ ActiveRecord::Schema.define(:version => 28) do
t.text "event_type", :null => false
t.text "params_yaml", :null => false
t.datetime "created_at", :null => false
+ t.string "described_state"
end
create_table "info_requests", :force => true do |t|
- t.text "title", :null => false
- t.integer "user_id", :null => false
- t.integer "public_body_id", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.string "described_state", :null => false
- t.boolean "awaiting_description", :default => false, :null => false
- t.integer "described_last_incoming_message_id"
+ t.text "title", :null => false
+ t.integer "user_id", :null => false
+ t.integer "public_body_id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "described_state", :null => false
+ t.boolean "awaiting_description", :default => false, :null => false
end
create_table "outgoing_messages", :force => true do |t|