Commit ab883cf9 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix/import_data-migration' into 'master'

Fix migration corrupting import data for old version upgrades

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19073

Not a fan of changing old migrations but this will prevent issues from upgrading GitLab version 8.6 or older to 8.10

More details of the issue on https://gitlab.com/gitlab-org/gitlab-ce/issues/19073#note_13190450

See merge request !5358
parent 7d279cc5
...@@ -134,6 +134,7 @@ v 8.10.0 (unreleased) ...@@ -134,6 +134,7 @@ v 8.10.0 (unreleased)
- Allow bulk (un)subscription from issues in issue index - Allow bulk (un)subscription from issues in issue index
- Fix MR diff encoding issues exporting GitLab projects - Fix MR diff encoding issues exporting GitLab projects
- Export and import avatar as part of project import/export - Export and import avatar as part of project import/export
- Fix migration corrupting import data for old version upgrades
v 8.9.6 v 8.9.6
- Fix importing of events under notes for GitLab projects. !5154 - Fix importing of events under notes for GitLab projects. !5154
......
...@@ -7,7 +7,13 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration ...@@ -7,7 +7,13 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
class ProjectImportDataFake class ProjectImportDataFake
extend AttrEncrypted extend AttrEncrypted
attr_accessor :credentials attr_accessor :credentials
attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, :mode => :per_attribute_iv_and_salt attr_encrypted :credentials,
key: Gitlab::Application.secrets.db_key_base,
marshal: true,
encode: true,
:mode => :per_attribute_iv_and_salt,
insecure_mode: true,
algorithm: 'aes-256-cbc'
end end
def up def up
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment