Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-03-26 19:58:35 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 15:00:04 +0300
commit403decbbad26bea620125aed34b440a9b6611172 (patch)
tree1c587d73c314873a113d27f4c271866770d6a57e /db/migrate/20180301010859_create_ci_builds_metadata_table.rb
parent7008ed1e33bff510126a0eb0e4f7bf1a7adb02bd (diff)
Add explicit primary key for ci_builds_metadata table
Diffstat (limited to 'db/migrate/20180301010859_create_ci_builds_metadata_table.rb')
-rw-r--r--db/migrate/20180301010859_create_ci_builds_metadata_table.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20180301010859_create_ci_builds_metadata_table.rb b/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
index 650bf43835d..ce737444092 100644
--- a/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
+++ b/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
@@ -4,16 +4,16 @@ class CreateCiBuildsMetadataTable < ActiveRecord::Migration
DOWNTIME = false
def change
- create_table :ci_builds_metadata, id: false do |t|
+ create_table :ci_builds_metadata do |t|
t.integer :build_id, null: false
t.integer :project_id, null: false
t.integer :timeout
t.integer :timeout_source, null: false, default: 1
- t.primary_key :build_id
t.foreign_key :ci_builds, column: :build_id, on_delete: :cascade
t.foreign_key :projects, column: :project_id, on_delete: :cascade
+ t.index :build_id, unique: true
t.index :project_id
end
end