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
b725c908
Commit
b725c908
authored
Oct 10, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename board_filter_labels table and simplify migration
parent
20d43709
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
29 deletions
+19
-29
db/migrate/20170926203418_create_board_filter_labels.rb
db/migrate/20170926203418_create_board_filter_labels.rb
+0
-23
db/migrate/20170926203418_create_board_labels.rb
db/migrate/20170926203418_create_board_labels.rb
+13
-0
db/schema.rb
db/schema.rb
+6
-6
No files found.
db/migrate/20170926203418_create_board_filter_labels.rb
deleted
100644 → 0
View file @
20d43709
class
CreateBoardFilterLabels
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
create_table
:board_filter_labels
do
|
t
|
t
.
integer
:board_id
,
null:
false
,
index:
true
t
.
integer
:label_id
,
null:
false
,
index:
true
end
add_index
:board_filter_labels
,
[
:board_id
,
:label_id
],
unique:
true
add_concurrent_foreign_key
:board_filter_labels
,
:boards
,
column: :board_id
,
on_delete: :cascade
add_concurrent_foreign_key
:board_filter_labels
,
:labels
,
column: :label_id
,
on_delete: :cascade
end
def
down
drop_table
:board_filter_labels
end
end
db/migrate/20170926203418_create_board_labels.rb
0 → 100644
View file @
b725c908
class
CreateBoardLabels
<
ActiveRecord
::
Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
change
create_table
:board_labels
do
|
t
|
t
.
references
:board
,
index:
true
,
foreign_key:
{
on_delete: :cascade
},
null:
false
t
.
references
:label
,
index:
true
,
foreign_key:
{
on_delete: :cascade
},
null:
false
t
.
index
[
:board_id
,
:label_id
],
unique:
true
end
end
end
db/schema.rb
View file @
b725c908
...
...
@@ -214,14 +214,14 @@ ActiveRecord::Schema.define(version: 20170926203418) do
add_index
"award_emoji"
,
[
"awardable_type"
,
"awardable_id"
],
name:
"index_award_emoji_on_awardable_type_and_awardable_id"
,
using: :btree
add_index
"award_emoji"
,
[
"user_id"
,
"name"
],
name:
"index_award_emoji_on_user_id_and_name"
,
using: :btree
create_table
"board_
filter_
labels"
,
force: :cascade
do
|
t
|
create_table
"board_labels"
,
force: :cascade
do
|
t
|
t
.
integer
"board_id"
,
null:
false
t
.
integer
"label_id"
,
null:
false
end
add_index
"board_
filter_labels"
,
[
"board_id"
,
"label_id"
],
name:
"index_board_filter
_labels_on_board_id_and_label_id"
,
unique:
true
,
using: :btree
add_index
"board_
filter_labels"
,
[
"board_id"
],
name:
"index_board_filter
_labels_on_board_id"
,
using: :btree
add_index
"board_
filter_labels"
,
[
"label_id"
],
name:
"index_board_filter
_labels_on_label_id"
,
using: :btree
add_index
"board_
labels"
,
[
"board_id"
,
"label_id"
],
name:
"index_board
_labels_on_board_id_and_label_id"
,
unique:
true
,
using: :btree
add_index
"board_
labels"
,
[
"board_id"
],
name:
"index_board
_labels_on_board_id"
,
using: :btree
add_index
"board_
labels"
,
[
"label_id"
],
name:
"index_board
_labels_on_label_id"
,
using: :btree
create_table
"boards"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
...
...
@@ -2059,8 +2059,8 @@ ActiveRecord::Schema.define(version: 20170926203418) do
add_foreign_key
"approvals"
,
"merge_requests"
,
name:
"fk_310d714958"
,
on_delete: :cascade
add_foreign_key
"approver_groups"
,
"namespaces"
,
column:
"group_id"
,
on_delete: :cascade
add_foreign_key
"board_
filter_labels"
,
"boards"
,
name:
"fk_53e44f3a07
"
,
on_delete: :cascade
add_foreign_key
"board_
filter_labels"
,
"labels"
,
name:
"fk_91e18fdcee
"
,
on_delete: :cascade
add_foreign_key
"board_
labels"
,
"boards
"
,
on_delete: :cascade
add_foreign_key
"board_
labels"
,
"labels
"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_1e9a074a35"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"projects"
,
name:
"fk_f15266b5f9"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"users"
,
column:
"assignee_id"
,
name:
"fk_2a3450e77c"
,
on_delete: :nullify
...
...
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