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
a6d39980
Commit
a6d39980
authored
Sep 22, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unique contrainst to labels association
parent
29b90ce8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
db/migrate/20170921203824_create_board_filter_labels.rb
db/migrate/20170921203824_create_board_filter_labels.rb
+2
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
db/migrate/20170921203824_create_board_filter_labels.rb
View file @
a6d39980
...
...
@@ -11,6 +11,8 @@ class CreateBoardFilterLabels < ActiveRecord::Migration
t
.
integer
:label_id
,
null:
false
,
index:
true
end
add_index
:board_filter_labels
,
[
:board_filter_id
,
:label_id
],
unique:
true
add_concurrent_foreign_key
:board_filter_labels
,
:board_filters
,
column: :board_filter_id
,
on_delete: :cascade
add_concurrent_foreign_key
:board_filter_labels
,
:labels
,
column: :label_id
,
on_delete: :cascade
end
...
...
db/schema.rb
View file @
a6d39980
...
...
@@ -219,6 +219,7 @@ ActiveRecord::Schema.define(version: 20170921203824) do
t
.
integer
"label_id"
,
null:
false
end
add_index
"board_filter_labels"
,
[
"board_filter_id"
,
"label_id"
],
name:
"index_board_filter_labels_on_board_filter_id_and_label_id"
,
unique:
true
,
using: :btree
add_index
"board_filter_labels"
,
[
"board_filter_id"
],
name:
"index_board_filter_labels_on_board_filter_id"
,
using: :btree
add_index
"board_filter_labels"
,
[
"label_id"
],
name:
"index_board_filter_labels_on_label_id"
,
using: :btree
...
...
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