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
d6a0c288
Commit
d6a0c288
authored
Jun 12, 2017
by
Bob Van Landuyt
Committed by
Bob Van Landuyt
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the migration name as a key in redis
parent
229ac39a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
...atabase/rename_reserved_paths_migration/v1/rename_base.rb
+1
-1
spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb
...se/rename_reserved_paths_migration/v1/rename_base_spec.rb
+1
-1
spec/support/fake_migration_classes.rb
spec/support/fake_migration_classes.rb
+4
-0
No files found.
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
View file @
d6a0c288
...
@@ -144,7 +144,7 @@ module Gitlab
...
@@ -144,7 +144,7 @@ module Gitlab
end
end
def
redis_key_for_type
(
type
)
def
redis_key_for_type
(
type
)
"rename:
#{
migration
.
version
}
:
#{
type
}
"
"rename:
#{
migration
.
name
}
:
#{
type
}
"
end
end
def
file_storage?
def
file_storage?
...
...
spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base_spec.rb
View file @
d6a0c288
...
@@ -231,7 +231,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameBase, :trunca
...
@@ -231,7 +231,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameBase, :trunca
describe
'#track_rename'
,
redis:
true
do
describe
'#track_rename'
,
redis:
true
do
it
'tracks a rename in redis'
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'
)
subject
.
track_rename
(
'namespace'
,
'path/to/namespace'
,
'path/to/renamed'
)
...
...
spec/support/fake_migration_classes.rb
View file @
d6a0c288
...
@@ -4,4 +4,8 @@ class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration
...
@@ -4,4 +4,8 @@ class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration
def
version
def
version
'20170316163845'
'20170316163845'
end
end
def
name
"FakeRenameReservedPathMigrationV1"
end
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