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
Jérome Perrin
gitlab-ce
Commits
163e9f99
Commit
163e9f99
authored
Apr 06, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indexes in container repositories table
parent
6d7a5248
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
9 deletions
+1
-9
db/migrate/20170322013926_create_container_repository.rb
db/migrate/20170322013926_create_container_repository.rb
+1
-2
spec/models/container_repository_spec.rb
spec/models/container_repository_spec.rb
+0
-7
No files found.
db/migrate/20170322013926_create_container_repository.rb
View file @
163e9f99
...
@@ -5,13 +5,12 @@ class CreateContainerRepository < ActiveRecord::Migration
...
@@ -5,13 +5,12 @@ class CreateContainerRepository < ActiveRecord::Migration
def
change
def
change
create_table
:container_repositories
do
|
t
|
create_table
:container_repositories
do
|
t
|
t
.
references
:project
,
foreign_key:
true
,
null:
false
t
.
references
:project
,
foreign_key:
true
,
index:
true
,
null:
false
t
.
string
:name
,
null:
false
t
.
string
:name
,
null:
false
t
.
timestamps
null:
false
t
.
timestamps
null:
false
end
end
add_index
:container_repositories
,
:project_id
add_index
:container_repositories
,
[
:project_id
,
:name
],
unique:
true
add_index
:container_repositories
,
[
:project_id
,
:name
],
unique:
true
end
end
end
end
spec/models/container_repository_spec.rb
View file @
163e9f99
...
@@ -21,13 +21,6 @@ describe ContainerRepository do
...
@@ -21,13 +21,6 @@ describe ContainerRepository do
headers:
{
'Content-Type'
=>
'application/json'
})
headers:
{
'Content-Type'
=>
'application/json'
})
end
end
describe
'validations'
do
it
'validates uniqueness of name scoped to project'
do
expect
(
subject
).
to
validate_uniqueness_of
(
:name
)
.
scoped_to
(
:project_id
)
end
end
describe
'associations'
do
describe
'associations'
do
it
'belongs to the project'
do
it
'belongs to the project'
do
expect
(
container_repository
).
to
belong_to
(
:project
)
expect
(
container_repository
).
to
belong_to
(
:project
)
...
...
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