diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-09-13 15:47:57 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-09-13 15:47:57 +0100 |
commit | 76b4697ae2490fc227ac0f150d07b74bb3ca5fa3 (patch) | |
tree | 6e5655ec4c368b8c61718d4febb734a059629aed | |
parent | a622b31a33658696525ad675cdeb1e433f2a7c8b (diff) |
Add index on updated_at to public body versions as this is how they are retrieved in the admin timeline view.
-rw-r--r-- | db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb b/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb new file mode 100644 index 000000000..6ae58c884 --- /dev/null +++ b/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb @@ -0,0 +1,9 @@ +class AddUpdatedAtIndexToPublicBodyVersions < ActiveRecord::Migration + def self.up + add_index :public_body_versions, :updated_at + end + + def self.down + remove_index :public_body_versions, :updated_at + end +end |