Use the migration name as a key in redis
This commit is contained in:
parent
229ac39a4c
commit
d6a0c288c8
3 changed files with 6 additions and 2 deletions
|
@ -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?
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -4,4 +4,8 @@ class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration
|
|||
def version
|
||||
'20170316163845'
|
||||
end
|
||||
|
||||
def name
|
||||
"FakeRenameReservedPathMigrationV1"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue