diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-06 13:25:09 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-06 18:34:19 +0300 |
commit | 163e9f99ab29524bca204fbd0d0aabc1a1813e4a (patch) | |
tree | c9ca5fc023bfea789cd8c1cc2277138a90eb77ea /db | |
parent | 6d7a52480ccb291de1f9341ed37232fd40b58415 (diff) |
Fix indexes in container repositories table
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170322013926_create_container_repository.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/db/migrate/20170322013926_create_container_repository.rb b/db/migrate/20170322013926_create_container_repository.rb index 32eba3903b1..91540bc88bd 100644 --- a/db/migrate/20170322013926_create_container_repository.rb +++ b/db/migrate/20170322013926_create_container_repository.rb @@ -5,13 +5,12 @@ class CreateContainerRepository < ActiveRecord::Migration def change create_table :container_repositories do |t| - t.references :project, foreign_key: true, null: false + t.references :project, foreign_key: true, index: true, null: false t.string :name, null: false t.timestamps null: false end - add_index :container_repositories, :project_id add_index :container_repositories, [:project_id, :name], unique: true end end |