Commit a4dc5f79 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Make project_id, iid unique for deployments

parent 9e487100
......@@ -20,7 +20,7 @@ class AddDeployments < ActiveRecord::Migration
add_index :deployments, :project_id
add_index :deployments, [:project_id, :iid]
add_index :deployments, [:project_id, :iid], unique: true
add_index :deployments, [:project_id, :environment_id]
add_index :deployments, [:project_id, :environment_id, :iid]
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment