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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
a009e763
Commit
a009e763
authored
May 17, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-fix-migration' into 'master'
Fix data migration from trigger schedules See merge request !11460
parents
fb31c6ce
cf6ba755
Changes
1
Hide 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 @
a009e763
...
@@ -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