aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-04 15:03:02 +0100
committerLouise Crow <louise.crow@gmail.com>2013-06-04 15:03:02 +0100
commita885764b65916020d9182073b38f6951a20d4b8c (patch)
tree0988651c144b65a8e46b28b376b2e72a5947d934 /db/migrate
parenteb1c465162420ad62c16dccb983cb28aa89a4639 (diff)
parenta919141992a40599f99b32bd4a8312a0009f3f7a (diff)
Merge branch 'release/0.11'0.11.0.3
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/006_version_public_body.rb2
-rw-r--r--db/migrate/101_add_hash_to_info_request.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/db/migrate/006_version_public_body.rb b/db/migrate/006_version_public_body.rb
index 34586add2..0e4527133 100644
--- a/db/migrate/006_version_public_body.rb
+++ b/db/migrate/006_version_public_body.rb
@@ -1,6 +1,8 @@
class VersionPublicBody < ActiveRecord::Migration
def self.up
PublicBody.create_versioned_table
+
+ add_timestamps(:public_body_versions)
end
def self.down
diff --git a/db/migrate/101_add_hash_to_info_request.rb b/db/migrate/101_add_hash_to_info_request.rb
index e21bf0989..e38384cd6 100644
--- a/db/migrate/101_add_hash_to_info_request.rb
+++ b/db/migrate/101_add_hash_to_info_request.rb
@@ -5,13 +5,11 @@ class AddHashToInfoRequest < ActiveRecord::Migration
add_column :info_requests, :idhash, :string
# Create the missing events for requests already sent
- InfoRequest.find(:all).each do |info_request|
- info_request.idhash = Digest::SHA1.hexdigest(info_request.id.to_s + Configuration::incoming_email_secret)[0,8]
+ InfoRequest.all.each do |info_request|
+ info_request.idhash = Digest::SHA1.hexdigest(info_request.id.to_s + AlaveteliConfiguration::incoming_email_secret)[0,8]
info_request.save!
- puts info_request.idhash
end
change_column :info_requests, :idhash, :string, :null => false
- puts InfoRequest.find_by_idhash
end
def self.down
remove_column :info_requests, :idhash