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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
e3d32e8a
Commit
e3d32e8a
authored
Jan 30, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
2057a6ac
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
10 deletions
+7
-10
app/models/group.rb
app/models/group.rb
+0
-1
app/models/upload.rb
app/models/upload.rb
+1
-1
db/migrate/20180119135717_add_uploader_index_to_uploads.rb
db/migrate/20180119135717_add_uploader_index_to_uploads.rb
+2
-2
db/schema.rb
db/schema.rb
+4
-2
spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
...ab/background_migration/prepare_untracked_uploads_spec.rb
+0
-4
No files found.
app/models/group.rb
View file @
e3d32e8a
...
@@ -37,7 +37,6 @@ class Group < Namespace
...
@@ -37,7 +37,6 @@ class Group < Namespace
validates
:two_factor_grace_period
,
presence:
true
,
numericality:
{
greater_than_or_equal_to:
0
}
validates
:two_factor_grace_period
,
presence:
true
,
numericality:
{
greater_than_or_equal_to:
0
}
after_create
:post_create_hook
after_create
:post_create_hook
after_destroy
:post_destroy_hook
after_destroy
:post_destroy_hook
after_save
:update_two_factor_requirement
after_save
:update_two_factor_requirement
...
...
app/models/upload.rb
View file @
e3d32e8a
...
@@ -47,7 +47,7 @@ class Upload < ActiveRecord::Base
...
@@ -47,7 +47,7 @@ class Upload < ActiveRecord::Base
end
end
def
local?
def
local?
return
true
true
end
end
def
foreground_checksummable?
def
foreground_checksummable?
...
...
db/migrate/20180119135717_add_uploader_index_to_uploads.rb
View file @
e3d32e8a
...
@@ -9,12 +9,12 @@ class AddUploaderIndexToUploads < ActiveRecord::Migration
...
@@ -9,12 +9,12 @@ class AddUploaderIndexToUploads < ActiveRecord::Migration
disable_ddl_transaction!
disable_ddl_transaction!
def
up
def
up
remove_concurrent_index
:uploads
,
:path
remove_concurrent_index
:uploads
,
:path
if
index_exists?
:uploads
,
:path
add_concurrent_index
:uploads
,
[
:uploader
,
:path
],
using: :btree
add_concurrent_index
:uploads
,
[
:uploader
,
:path
],
using: :btree
end
end
def
down
def
down
remove_concurrent_index
:uploads
,
[
:uploader
,
:path
]
remove_concurrent_index
:uploads
,
[
:uploader
,
:path
]
if
index_exists?
:uploads
,
[
:uploads
,
:path
]
add_concurrent_index
:uploads
,
:path
,
using: :btree
add_concurrent_index
:uploads
,
:path
,
using: :btree
end
end
end
end
db/schema.rb
View file @
e3d32e8a
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201801
15201419
)
do
ActiveRecord
::
Schema
.
define
(
version:
201801
29193323
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"plpgsql"
...
@@ -1751,11 +1751,13 @@ ActiveRecord::Schema.define(version: 20180115201419) do
...
@@ -1751,11 +1751,13 @@ ActiveRecord::Schema.define(version: 20180115201419) do
t
.
string
"model_type"
t
.
string
"model_type"
t
.
string
"uploader"
,
null:
false
t
.
string
"uploader"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
string
"mount_point"
t
.
string
"secret"
end
end
add_index
"uploads"
,
[
"checksum"
],
name:
"index_uploads_on_checksum"
,
using: :btree
add_index
"uploads"
,
[
"checksum"
],
name:
"index_uploads_on_checksum"
,
using: :btree
add_index
"uploads"
,
[
"model_id"
,
"model_type"
],
name:
"index_uploads_on_model_id_and_model_type"
,
using: :btree
add_index
"uploads"
,
[
"model_id"
,
"model_type"
],
name:
"index_uploads_on_model_id_and_model_type"
,
using: :btree
add_index
"uploads"
,
[
"
path"
],
name:
"index_uploads_on
_path"
,
using: :btree
add_index
"uploads"
,
[
"
uploader"
,
"path"
],
name:
"index_uploads_on_uploader_and
_path"
,
using: :btree
create_table
"user_agent_details"
,
force: :cascade
do
|
t
|
create_table
"user_agent_details"
,
force: :cascade
do
|
t
|
t
.
string
"user_agent"
,
null:
false
t
.
string
"user_agent"
,
null:
false
...
...
spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
View file @
e3d32e8a
...
@@ -132,10 +132,6 @@ describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :sidekiq do
...
@@ -132,10 +132,6 @@ describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :sidekiq do
context
'when there are files in /uploads/tmp'
do
context
'when there are files in /uploads/tmp'
do
it_behaves_like
'does not add files in /uploads/tmp'
it_behaves_like
'does not add files in /uploads/tmp'
described_class
.
new
.
perform
expect
(
untracked_files_for_uploads
.
count
).
to
eq
(
5
)
end
end
end
end
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