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
adf0b2a7
Commit
adf0b2a7
authored
May 07, 2018
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes EE version of MigrateImportAttributesDataFromProjectsToProjectMirrorData
parent
acadbb62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
38 deletions
+1
-38
db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb
...t_attributes_data_from_projects_to_project_mirror_data.rb
+1
-0
db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data_ce.rb
...ttributes_data_from_projects_to_project_mirror_data_ce.rb
+0
-38
No files found.
db/post_migrate/20180
430144643
_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb
→
db/post_migrate/20180
502134117
_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb
View file @
adf0b2a7
...
...
@@ -34,4 +34,5 @@ class MigrateImportAttributesDataFromProjectsToProjectMirrorData < ActiveRecord:
queue_background_migration_jobs_by_range_at_intervals
(
import_state
,
DOWN_MIGRATION
,
DELAY_INTERVAL
,
batch_size:
BATCH_SIZE
)
end
end
db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data_ce.rb
deleted
100644 → 0
View file @
acadbb62
class
MigrateImportAttributesDataFromProjectsToProjectMirrorDataCe
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
UP_MIGRATION
=
'PopulateImportState'
.
freeze
DOWN_MIGRATION
=
'RollbackImportStateData'
.
freeze
BATCH_SIZE
=
1000
DELAY_INTERVAL
=
5
.
minutes
disable_ddl_transaction!
class
Project
<
ActiveRecord
::
Base
include
EachBatch
self
.
table_name
=
'projects'
end
class
ProjectImportState
<
ActiveRecord
::
Base
include
EachBatch
self
.
table_name
=
'project_mirror_data'
end
def
up
projects
=
Project
.
where
.
not
(
import_status: :none
)
queue_background_migration_jobs_by_range_at_intervals
(
projects
,
UP_MIGRATION
,
DELAY_INTERVAL
,
batch_size:
BATCH_SIZE
)
end
def
down
import_state
=
ProjectImportState
.
where
.
not
(
status: :none
)
queue_background_migration_jobs_by_range_at_intervals
(
import_state
,
DOWN_MIGRATION
,
DELAY_INTERVAL
,
batch_size:
BATCH_SIZE
)
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