diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-04-06 01:07:36 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-07 05:20:16 +0300 |
commit | 2c6c61815edada16c4477c938209c24c647e1798 (patch) | |
tree | 1d896b8ac1c5160b33116bc6d60e785df51cce79 /db | |
parent | 6b2954ec8a2e17c913872c32386cb2b08f2db1c2 (diff) |
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')
-rw-r--r-- | db/migrate/20180405142733_create_project_deploy_tokens.rb | 5 |
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 |