Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cf6ba755
Commit
cf6ba755
authored
May 17, 2017
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix data migration from trigger schedules
parent
6a2bcb4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb
...121605_migrate_trigger_schedules_to_pipeline_schedules.rb
+7
-0
No files found.
db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb
View file @
cf6ba755
...
@@ -4,6 +4,13 @@ class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration
...
@@ -4,6 +4,13 @@ class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration
DOWNTIME
=
false
DOWNTIME
=
false
def
up
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
connection
.
execute
<<-
SQL
INSERT INTO ci_pipeline_schedules (
INSERT INTO ci_pipeline_schedules (
project_id,
project_id,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment