aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/045_add_circumstance_to_post_redirect.rb11
-rw-r--r--db/schema.rb13
2 files changed, 18 insertions, 6 deletions
diff --git a/db/migrate/045_add_circumstance_to_post_redirect.rb b/db/migrate/045_add_circumstance_to_post_redirect.rb
new file mode 100644
index 000000000..e6e7ca513
--- /dev/null
+++ b/db/migrate/045_add_circumstance_to_post_redirect.rb
@@ -0,0 +1,11 @@
+class AddCircumstanceToPostRedirect < ActiveRecord::Migration
+ def self.up
+ add_column :post_redirects, :circumstance, :text, :default => "normal"
+ PostRedirect.update_all "circumstance = 'normal'"
+ change_column :post_redirects, :circumstance, :text, :default => "normal", :null => false
+ end
+
+ def self.down
+ remove_column :post_redirects, :circumstance
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2f304ddc7..d057a9a10 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 => 44) do
+ActiveRecord::Schema.define(:version => 45) do
create_table "incoming_messages", :force => true do |t|
t.integer "info_request_id", :null => false
@@ -56,14 +56,15 @@ ActiveRecord::Schema.define(:version => 44) do
end
create_table "post_redirects", :force => true do |t|
- t.text "token", :null => false
- t.text "uri", :null => false
+ t.text "token", :null => false
+ t.text "uri", :null => false
t.text "post_params_yaml"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.text "email_token", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.text "email_token", :null => false
t.text "reason_params_yaml"
t.integer "user_id"
+ t.text "circumstance", :default => "normal", :null => false
end
add_index "post_redirects", ["email_token"], :name => "index_post_redirects_on_email_token"