Cleanup after adding MR diff's commit_count
* processes any pending records which are not migrated yet * bumps import_export version because of new commits_count attribute * removes commits_count fallback method
This commit is contained in:
parent
8a0052c037
commit
0b7d108514
9 changed files with 18 additions and 7 deletions
|
@ -197,10 +197,6 @@ class MergeRequestDiff < ActiveRecord::Base
|
|||
CompareService.new(project, head_commit_sha).execute(project, sha, straight: true)
|
||||
end
|
||||
|
||||
def commits_count
|
||||
super || merge_request_diff_commits.size
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def create_merge_request_diff_files(diffs)
|
||||
|
|
14
db/migrate/20180304204842_clean_commits_count_migration.rb
Normal file
14
db/migrate/20180304204842_clean_commits_count_migration.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class CleanCommitsCountMigration < ActiveRecord::Migration
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
|
||||
DOWNTIME = false
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
Gitlab::BackgroundMigration.steal('AddMergeRequestDiffCommitsCount')
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20180301084653) do
|
||||
ActiveRecord::Schema.define(version: 20180304204842) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
|
@ -31,7 +31,8 @@ with all their related data and be moved into a new GitLab instance.
|
|||
|
||||
| GitLab version | Import/Export version |
|
||||
| ---------------- | --------------------- |
|
||||
| 10.4 to current | 0.2.2 |
|
||||
| 10.6 to current | 0.2.3 |
|
||||
| 10.4 | 0.2.2 |
|
||||
| 10.3 | 0.2.1 |
|
||||
| 10.0 | 0.2.0 |
|
||||
| 9.4.0 | 0.1.8 |
|
||||
|
|
|
@ -3,7 +3,7 @@ module Gitlab
|
|||
extend self
|
||||
|
||||
# For every version update, the version history in import_export.md has to be kept up to date.
|
||||
VERSION = '0.2.2'.freeze
|
||||
VERSION = '0.2.3'.freeze
|
||||
FILENAME_LIMIT = 50
|
||||
|
||||
def export_path(relative_path:)
|
||||
|
|
Binary file not shown.
BIN
vendor/project_templates/express.tar.gz
vendored
BIN
vendor/project_templates/express.tar.gz
vendored
Binary file not shown.
BIN
vendor/project_templates/rails.tar.gz
vendored
BIN
vendor/project_templates/rails.tar.gz
vendored
Binary file not shown.
BIN
vendor/project_templates/spring.tar.gz
vendored
BIN
vendor/project_templates/spring.tar.gz
vendored
Binary file not shown.
Loading…
Reference in a new issue