diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-16 12:02:42 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-24 21:39:09 +0400 |
commit | c46a0612706a2570342178fe8f61222034675c38 (patch) | |
tree | 15ca39227164c7724c54facbb9f2add8e1c00eb4 /db/migrate/20140416074002_add_index_on_iid.rb | |
parent | 2a99f18478797c67e0b795d71688bd06153abe5a (diff) |
Add uniq db index on project_id+iid
Diffstat (limited to 'db/migrate/20140416074002_add_index_on_iid.rb')
-rw-r--r-- | db/migrate/20140416074002_add_index_on_iid.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/db/migrate/20140416074002_add_index_on_iid.rb b/db/migrate/20140416074002_add_index_on_iid.rb new file mode 100644 index 00000000000..cbd09082781 --- /dev/null +++ b/db/migrate/20140416074002_add_index_on_iid.rb @@ -0,0 +1,7 @@ +class AddIndexOnIid < ActiveRecord::Migration + def change + add_index :issues, [:project_id, :iid], unique: true + add_index :merge_requests, [:target_project_id, :iid], unique: true + add_index :milestones, [:project_id, :iid], unique: true + end +end |