summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/14_pipelines.rb2
-rw-r--r--db/fixtures/development/17_cycle_analytics.rb4
-rw-r--r--db/migrate/20191115114032_add_processed_to_ci_builds.rb9
-rw-r--r--db/schema.rb1
4 files changed, 13 insertions, 3 deletions
diff --git a/db/fixtures/development/14_pipelines.rb b/db/fixtures/development/14_pipelines.rb
index 4e9131c1a46..417a68d6ad7 100644
--- a/db/fixtures/development/14_pipelines.rb
+++ b/db/fixtures/development/14_pipelines.rb
@@ -57,7 +57,7 @@ class Gitlab::Seeder::Pipelines
BUILDS.each { |opts| build_create!(pipeline, opts) }
EXTERNAL_JOBS.each { |opts| commit_status_create!(pipeline, opts) }
pipeline.update_duration
- pipeline.update_status
+ pipeline.update_legacy_status
end
end
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index 4698a42c8b6..b2252d31cac 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -187,7 +187,7 @@ class Gitlab::Seeder::CycleAnalytics
pipeline.builds.each(&:enqueue) # make sure all pipelines in pending state
pipeline.builds.each(&:run!)
- pipeline.update_status
+ pipeline.update_legacy_status
end
end
@@ -208,7 +208,7 @@ class Gitlab::Seeder::CycleAnalytics
job = merge_request.head_pipeline.builds.where.not(environment: nil).last
job.success!
- job.pipeline.update_status
+ job.pipeline.update_legacy_status
end
end
end
diff --git a/db/migrate/20191115114032_add_processed_to_ci_builds.rb b/db/migrate/20191115114032_add_processed_to_ci_builds.rb
new file mode 100644
index 00000000000..f6f8f5e85d6
--- /dev/null
+++ b/db/migrate/20191115114032_add_processed_to_ci_builds.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddProcessedToCiBuilds < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ add_column :ci_builds, :processed, :boolean
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2c00254cd04..ebe75bf5abc 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -697,6 +697,7 @@ ActiveRecord::Schema.define(version: 2020_01_14_204949) do
t.integer "upstream_pipeline_id"
t.bigint "resource_group_id"
t.datetime_with_timezone "waiting_for_resource_at"
+ t.boolean "processed"
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])))"