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
Léo-Paul Géneau
gitlab-ce
Commits
321e580e
Commit
321e580e
authored
May 18, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename FillFileStoreUpload to FillStoreUpload
parent
26b3816d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
db/post_migrate/20180424151928_fill_file_store.rb
db/post_migrate/20180424151928_fill_file_store.rb
+2
-1
lib/gitlab/background_migration/fill_store_upload.rb
lib/gitlab/background_migration/fill_store_upload.rb
+2
-2
No files found.
db/post_migrate/20180424151928_fill_file_store.rb
View file @
321e580e
...
...
@@ -28,10 +28,11 @@ class FillFileStore < ActiveRecord::Migration
class
Upload
<
ActiveRecord
::
Base
include
EachBatch
self
.
table_name
=
'uploads'
self
.
inheritance_column
=
:_type_disabled
# Disable STI
BATCH_SIZE
=
10_000
def
self
.
params_for_background_migration
yield
self
.
where
(
store:
nil
),
'Fill
File
StoreUpload'
,
5
.
minutes
,
BATCH_SIZE
yield
self
.
where
(
store:
nil
),
'FillStoreUpload'
,
5
.
minutes
,
BATCH_SIZE
end
end
...
...
lib/gitlab/background_migration/fill_
file_
store_upload.rb
→
lib/gitlab/background_migration/fill_store_upload.rb
View file @
321e580e
...
...
@@ -4,14 +4,14 @@
module
Gitlab
module
BackgroundMigration
class
Fill
File
StoreUpload
class
FillStoreUpload
class
Upload
<
ActiveRecord
::
Base
self
.
table_name
=
'uploads'
self
.
inheritance_column
=
:_type_disabled
end
def
perform
(
start_id
,
stop_id
)
Gitlab
::
BackgroundMigration
::
Fill
File
StoreUpload
::
Upload
Gitlab
::
BackgroundMigration
::
FillStoreUpload
::
Upload
.
where
(
'store is NULL'
)
.
where
(
id:
(
start_id
..
stop_id
))
.
update_all
(
store:
1
)
...
...
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