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
Jérome Perrin
gitlab-ce
Commits
66ba0b0a
Commit
66ba0b0a
authored
Jun 21, 2017
by
Bob Van Landuyt
Committed by
Bob Van Landuyt
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear the cache for projects one-by-one
parent
589b0da7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
...atabase/rename_reserved_paths_migration/v1/rename_base.rb
+16
-14
No files found.
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
View file @
66ba0b0a
...
@@ -102,24 +102,26 @@ module Gitlab
...
@@ -102,24 +102,26 @@ module Gitlab
end
end
def
remove_cached_html_for_projects
(
project_ids
)
def
remove_cached_html_for_projects
(
project_ids
)
project_ids
.
each
do
|
project_id
|
update_column_in_batches
(
:projects
,
:description_html
,
nil
)
do
|
table
,
query
|
update_column_in_batches
(
:projects
,
:description_html
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:id
].
in
(
project_ids
))
query
.
where
(
table
[
:id
].
eq
(
project_id
))
end
end
update_column_in_batches
(
:issues
,
:description_html
,
nil
)
do
|
table
,
query
|
update_column_in_batches
(
:issues
,
:description_html
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:project_id
].
in
(
project_ids
))
query
.
where
(
table
[
:project_id
].
eq
(
project_id
))
end
end
update_column_in_batches
(
:merge_requests
,
:description_html
,
nil
)
do
|
table
,
query
|
update_column_in_batches
(
:merge_requests
,
:description_html
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:target_project_id
].
in
(
project_ids
))
query
.
where
(
table
[
:target_project_id
].
eq
(
project_id
))
end
end
update_column_in_batches
(
:notes
,
:note_html
,
nil
)
do
|
table
,
query
|
update_column_in_batches
(
:notes
,
:note_html
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:project_id
].
in
(
project_ids
))
query
.
where
(
table
[
:project_id
].
eq
(
project_id
))
end
end
update_column_in_batches
(
:milestones
,
:description_html
,
nil
)
do
|
table
,
query
|
update_column_in_batches
(
:milestones
,
:description_html
,
nil
)
do
|
table
,
query
|
query
.
where
(
table
[
:project_id
].
in
(
project_ids
))
query
.
where
(
table
[
:project_id
].
eq
(
project_id
))
end
end
end
end
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