summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2018-04-06 00:07:36 +0200
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-06 21:20:16 -0500
commit2c6c61815edada16c4477c938209c24c647e1798 (patch)
tree1d896b8ac1c5160b33116bc6d60e785df51cce79 /db/migrate
parent6b2954ec8a2e17c913872c32386cb2b08f2db1c2 (diff)
downloadgitlab-ce-2c6c61815edada16c4477c938209c24c647e1798.tar.gz
Get rid of Redis when dealing with deploy tokens
We use controller actions to pass a newly created token and errors
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180405142733_create_project_deploy_tokens.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/db/migrate/20180405142733_create_project_deploy_tokens.rb b/db/migrate/20180405142733_create_project_deploy_tokens.rb
index 6cfb092a420..adc4c526c9b 100644
--- a/db/migrate/20180405142733_create_project_deploy_tokens.rb
+++ b/db/migrate/20180405142733_create_project_deploy_tokens.rb
@@ -7,13 +7,12 @@ class CreateProjectDeployTokens < ActiveRecord::Migration
create_table :project_deploy_tokens do |t|
t.integer :project_id, null: false
t.integer :deploy_token_id, null: false
+ t.timestamps null: false
t.foreign_key :deploy_tokens, column: :deploy_token_id, on_delete: :cascade
t.foreign_key :projects, column: :project_id, on_delete: :cascade
- t.timestamps null: false
+ t.index [:project_id, :deploy_token_id], unique: true
end
-
- add_index :project_deploy_tokens, [:project_id, :deploy_token_id], unique: true
end
end