summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190821103353_add_priority_to_ci_builds.rb12
-rw-r--r--db/schema.rb3
2 files changed, 14 insertions, 1 deletions
diff --git a/db/migrate/20190821103353_add_priority_to_ci_builds.rb b/db/migrate/20190821103353_add_priority_to_ci_builds.rb
new file mode 100644
index 00000000000..a79becc30a4
--- /dev/null
+++ b/db/migrate/20190821103353_add_priority_to_ci_builds.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddPriorityToCiBuilds < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ add_column :ci_builds, :scheduler_priority, :integer, limit: 2
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index ce5fd38129a..8f606748b2f 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_08_15_093949) do
+ActiveRecord::Schema.define(version: 2019_08_21_103353) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -583,6 +583,7 @@ ActiveRecord::Schema.define(version: 2019_08_15_093949) do
t.datetime_with_timezone "scheduled_at"
t.string "token_encrypted"
t.integer "upstream_pipeline_id"
+ t.integer "scheduler_priority", limit: 2
t.index ["artifacts_expire_at"], name: "index_ci_builds_on_artifacts_expire_at", where: "(artifacts_file <> ''::text)"
t.index ["auto_canceled_by_id"], name: "index_ci_builds_on_auto_canceled_by_id"
t.index ["commit_id", "artifacts_expire_at", "id"], name: "index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial", where: "(((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('sast:container'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text])))"