diff options
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb index 3bf549a56eb..ce82a57fe7e 100644 --- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb +++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb @@ -144,7 +144,7 @@ module Gitlab end def redis_key_for_type(type) - "rename:#{migration.version}:#{type}" + "rename:#{migration.name}:#{type}" end def file_storage? diff --git a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb index f4e19f09419..2ce3fc0b497 100644 --- a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb +++ b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb @@ -231,7 +231,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameBase, :trunca describe '#track_rename', redis: true do it 'tracks a rename in redis' do - key = 'rename:20170316163845:namespace' + key = 'rename:FakeRenameReservedPathMigrationV1:namespace' subject.track_rename('namespace', 'path/to/namespace', 'path/to/renamed') diff --git a/spec/support/fake_migration_classes.rb b/spec/support/fake_migration_classes.rb index 33cd1043132..b0fc8422857 100644 --- a/spec/support/fake_migration_classes.rb +++ b/spec/support/fake_migration_classes.rb @@ -4,4 +4,8 @@ class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration def version '20170316163845' end + + def name + "FakeRenameReservedPathMigrationV1" + end end |