Commit
2f7e222c3e91b4e2d05e5deefcb37f64ee97f68d
indexing
| @@ -0,0 +1,9 @@ |
| @@ -0,0 +1,9 @@ |
| |
1
| +class CreateVisitorIndexes < ActiveRecord::Migration |
| |
2
| + def self.up |
| |
3
| + add_index :visitors, [:identifier, :site_id], :unique => true |
| |
4
| + end |
| |
5
| + |
| |
6
| + def self.down |
| |
7
| + remove_index :visitors, [:identifier, :site_id] |
| |
8
| + end |
| |
9
| +end |
| @@ -0,0 +1,9 @@ |
| @@ -0,0 +1,9 @@ |
| |
1
| +class RemoveExtraneousIndex < ActiveRecord::Migration |
| |
2
| + def self.up |
| |
3
| + remove_index :prompts, [:left_choice_id, :right_choice_id] |
| |
4
| + end |
| |
5
| + |
| |
6
| + def self.down |
| |
7
| + add_index :prompts, [:left_choice_id, :right_choice_id] |
| |
8
| + end |
| |
9
| +end |