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-05 19:35:06 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 14:57:41 +0300
commitbb64b20a1f7dd831e4c200343b531f9d048c02a8 (patch)
tree6223c95875e53a235bde1b26f9b06a1776acb1ca /db/migrate/20180301010859_create_ci_builds_metadata_table.rb
parent9ef86b1b12e80bcc3a6277e2b6a36b793c828489 (diff)
Refactorize Ci::Build and Ci::BuildMetadata models
Diffstat (limited to 'db/migrate/20180301010859_create_ci_builds_metadata_table.rb')
-rw-r--r--db/migrate/20180301010859_create_ci_builds_metadata_table.rb7
1 files changed, 5 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 9d5e9c1779b..cd7824d7788 100644
--- a/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
+++ b/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
@@ -4,10 +4,13 @@ class CreateCiBuildsMetadataTable < ActiveRecord::Migration
DOWNTIME = false
def change
- create_table :ci_builds_metadata do |t|
+ create_table :ci_builds_metadata, id: false do |t|
t.integer :build_id, null: false
t.integer :used_timeout
- t.integer :timeout_source
+ t.integer :timeout_source, null: false, default: 1
+
+ t.primary_key :build_id
+ t.foreign_key :ci_builds, column: :build_id, on_delete: :cascade
end
end
end