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
path: root/db
diff options
context:
space:
mode:
authorFabio Pitino <fpitino@gitlab.com>2019-08-19 17:29:53 +0300
committerFabio Pitino <fpitino@gitlab.com>2019-08-20 20:14:43 +0300
commit6c64896c112dfbf09b04bd8b1b0ae3c81ddddca5 (patch)
tree5f77ca294242219980a7fe7081d7e70867ea0220 /db
parent4a6d22ba439cb20937669c4aa2046acffb36a60e (diff)
Add active_jobs_limit to plans table
This is a port from EE changes where we introduce a new limit for Plan model. https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/1182
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190816151221_add_active_jobs_limit_to_plans.rb17
-rw-r--r--db/schema.rb3
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20190816151221_add_active_jobs_limit_to_plans.rb b/db/migrate/20190816151221_add_active_jobs_limit_to_plans.rb
new file mode 100644
index 00000000000..951ff41f1a8
--- /dev/null
+++ b/db/migrate/20190816151221_add_active_jobs_limit_to_plans.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddActiveJobsLimitToPlans < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default :plans, :active_jobs_limit, :integer, default: 0
+ end
+
+ def down
+ remove_column :plans, :active_jobs_limit
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a5079d3a5bc..7779401b980 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2019_07_15_114644) do
+ActiveRecord::Schema.define(version: 2019_08_16_151221) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -2397,6 +2397,7 @@ ActiveRecord::Schema.define(version: 2019_07_15_114644) do
t.string "title"
t.integer "active_pipelines_limit"
t.integer "pipeline_size_limit"
+ t.integer "active_jobs_limit", default: 0
t.index ["name"], name: "index_plans_on_name", using: :btree
end