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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-19 18:07:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-19 18:07:55 +0300
commitf92a53a216e6e7d5037ac701efbee5628f91aa9a (patch)
tree1eb957f0277b50002258681f61db869a2b683fec /db/migrate/20191128145231_add_ci_resource_groups.rb
parente3764d340e2849fccee8c06278d1f5f686edd35b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20191128145231_add_ci_resource_groups.rb')
-rw-r--r--db/migrate/20191128145231_add_ci_resource_groups.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20191128145231_add_ci_resource_groups.rb b/db/migrate/20191128145231_add_ci_resource_groups.rb
new file mode 100644
index 00000000000..8bde0254701
--- /dev/null
+++ b/db/migrate/20191128145231_add_ci_resource_groups.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class AddCiResourceGroups < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ create_table :ci_resource_groups do |t|
+ t.timestamps_with_timezone
+ t.bigint :project_id, null: false
+ t.string :key, null: false, limit: 255
+ t.index %i[project_id key], unique: true
+ end
+
+ create_table :ci_resources do |t|
+ t.timestamps_with_timezone
+ t.references :resource_group, null: false, index: false, foreign_key: { to_table: :ci_resource_groups, on_delete: :cascade }
+ t.bigint :build_id, null: true
+ t.index %i[build_id]
+ t.index %i[resource_group_id build_id], unique: true
+ end
+ end
+end