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
681dd0da
Commit
681dd0da
authored
Aug 07, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fixed start_date for records changed between regular migration and completion of deployment.
parent
63a2a54a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ee/db/post_migrate/20180713171825_update_epic_dates_from_milestones.rb
...grate/20180713171825_update_epic_dates_from_milestones.rb
+9
-0
No files found.
ee/db/post_migrate/20180713171825_update_epic_dates_from_milestones.rb
View file @
681dd0da
...
...
@@ -46,6 +46,15 @@ class UpdateEpicDatesFromMilestones < ActiveRecord::Migration
end
def
up
# Fill fixed date columns for remaining eligible records touched after regular migration is run
# (20180711014026_update_date_columns_on_epics) but before new app code takes effect.
Epic
.
where
(
start_date_is_fixed:
nil
).
where
.
not
(
start_date:
nil
).
each_batch
do
|
batch
|
batch
.
update_all
(
'start_date_is_fixed = true, start_date_fixed = start_date'
)
end
Epic
.
where
(
due_date_is_fixed:
nil
).
where
.
not
(
end_date:
nil
).
each_batch
do
|
batch
|
batch
.
update_all
(
'due_date_is_fixed = true, due_date_fixed = end_date'
)
end
Epic
.
joins
(
:issues
).
where
(
'issues.milestone_id IS NOT NULL'
).
each_batch
do
|
epics
|
Epic
.
update_start_and_due_dates
(
epics
)
end
...
...
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