Skip to content
Snippets Groups Projects
Commit 962eb555 authored by Robert Speicher's avatar Robert Speicher Committed by Regis
Browse files

Merge branch 'zj-fix-migration' into 'master'

Fix data migration from trigger schedules

See merge request !11460
parent 12a58aaf
No related branches found
No related tags found
1 merge request!12258Update Prometheus Merge Request Metrics page
Loading
Loading
@@ -4,6 +4,13 @@ class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration
DOWNTIME = false
 
def up
connection.execute <<~SQL
DELETE FROM ci_trigger_schedules WHERE NOT EXISTS
(SELECT true FROM projects
WHERE ci_trigger_schedules.project_id = projects.id
)
SQL
connection.execute <<-SQL
INSERT INTO ci_pipeline_schedules (
project_id,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment