Commit b7ded5be5fac1ec080ea7522f2a47d44e897bd41
1 parent
2987c4dc
Exists in
master
and in
1 other branch
giving the index a name
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
db/migrate/20091219054212_create_more_prompt_indexes.rb
1 | 1 | class CreateMorePromptIndexes < ActiveRecord::Migration |
2 | 2 | def self.up |
3 | - add_index :prompts, [:left_choice_id, :right_choice_id, :question_id], :name => "a_cool_index" | |
3 | + add_index :prompts, [:left_choice_id, :right_choice_id, :question_id], :name => "a_cool_index", :unique => true | |
4 | 4 | end |
5 | 5 | |
6 | 6 | def self.down | ... | ... |