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
c197361d
Commit
c197361d
authored
Oct 10, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add board assignees table creation migration
parent
8db002a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
db/migrate/20171010095526_create_board_assignees.rb
db/migrate/20171010095526_create_board_assignees.rb
+14
-0
db/schema.rb
db/schema.rb
+12
-4
No files found.
db/migrate/20171010095526_create_board_assignees.rb
0 → 100644
View file @
c197361d
class
CreateBoardAssignees
<
ActiveRecord
::
Migration
DOWNTIME
=
false
disable_ddl_transaction!
def
change
create_table
:board_assignees
do
|
t
|
t
.
references
:board
,
index:
true
,
foreign_key:
{
on_delete: :cascade
},
null:
false
t
.
integer
:assignee_id
,
null:
false
,
index:
true
t
.
foreign_key
:users
,
column: :assignee_id
,
on_delete: :cascade
t
.
index
[
:board_id
,
:assignee_id
],
unique:
true
end
end
end
db/schema.rb
View file @
c197361d
...
@@ -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:
2017
0926203418
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017
1010095526
)
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"
...
@@ -214,6 +214,15 @@ ActiveRecord::Schema.define(version: 20170926203418) do
...
@@ -214,6 +214,15 @@ 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"
,
[
"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
add_index
"award_emoji"
,
[
"user_id"
,
"name"
],
name:
"index_award_emoji_on_user_id_and_name"
,
using: :btree
create_table
"board_assignees"
,
force: :cascade
do
|
t
|
t
.
integer
"board_id"
,
null:
false
t
.
integer
"assignee_id"
,
null:
false
end
add_index
"board_assignees"
,
[
"assignee_id"
],
name:
"index_board_assignees_on_assignee_id"
,
using: :btree
add_index
"board_assignees"
,
[
"board_id"
,
"assignee_id"
],
name:
"index_board_assignees_on_board_id_and_assignee_id"
,
unique:
true
,
using: :btree
add_index
"board_assignees"
,
[
"board_id"
],
name:
"index_board_assignees_on_board_id"
,
using: :btree
create_table
"board_labels"
,
force: :cascade
do
|
t
|
create_table
"board_labels"
,
force: :cascade
do
|
t
|
t
.
integer
"board_id"
,
null:
false
t
.
integer
"board_id"
,
null:
false
t
.
integer
"label_id"
,
null:
false
t
.
integer
"label_id"
,
null:
false
...
@@ -231,10 +240,8 @@ ActiveRecord::Schema.define(version: 20170926203418) do
...
@@ -231,10 +240,8 @@ ActiveRecord::Schema.define(version: 20170926203418) do
t
.
integer
"milestone_id"
t
.
integer
"milestone_id"
t
.
integer
"group_id"
t
.
integer
"group_id"
t
.
integer
"weight"
t
.
integer
"weight"
t
.
integer
"assignee_id"
end
end
add_index
"boards"
,
[
"assignee_id"
],
name:
"index_boards_on_assignee_id"
,
using: :btree
add_index
"boards"
,
[
"group_id"
],
name:
"index_boards_on_group_id"
,
using: :btree
add_index
"boards"
,
[
"group_id"
],
name:
"index_boards_on_group_id"
,
using: :btree
add_index
"boards"
,
[
"milestone_id"
],
name:
"index_boards_on_milestone_id"
,
using: :btree
add_index
"boards"
,
[
"milestone_id"
],
name:
"index_boards_on_milestone_id"
,
using: :btree
add_index
"boards"
,
[
"project_id"
],
name:
"index_boards_on_project_id"
,
using: :btree
add_index
"boards"
,
[
"project_id"
],
name:
"index_boards_on_project_id"
,
using: :btree
...
@@ -2059,11 +2066,12 @@ ActiveRecord::Schema.define(version: 20170926203418) do
...
@@ -2059,11 +2066,12 @@ ActiveRecord::Schema.define(version: 20170926203418) do
add_foreign_key
"approvals"
,
"merge_requests"
,
name:
"fk_310d714958"
,
on_delete: :cascade
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
"approver_groups"
,
"namespaces"
,
column:
"group_id"
,
on_delete: :cascade
add_foreign_key
"board_assignees"
,
"boards"
,
on_delete: :cascade
add_foreign_key
"board_assignees"
,
"users"
,
column:
"assignee_id"
,
on_delete: :cascade
add_foreign_key
"board_labels"
,
"boards"
,
on_delete: :cascade
add_foreign_key
"board_labels"
,
"boards"
,
on_delete: :cascade
add_foreign_key
"board_labels"
,
"labels"
,
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"
,
"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"
,
"projects"
,
name:
"fk_f15266b5f9"
,
on_delete: :cascade
add_foreign_key
"boards"
,
"users"
,
column:
"assignee_id"
,
name:
"fk_2a3450e77c"
,
on_delete: :nullify
add_foreign_key
"chat_teams"
,
"namespaces"
,
on_delete: :cascade
add_foreign_key
"chat_teams"
,
"namespaces"
,
on_delete: :cascade
add_foreign_key
"ci_builds"
,
"ci_pipelines"
,
column:
"auto_canceled_by_id"
,
name:
"fk_a2141b1522"
,
on_delete: :nullify
add_foreign_key
"ci_builds"
,
"ci_pipelines"
,
column:
"auto_canceled_by_id"
,
name:
"fk_a2141b1522"
,
on_delete: :nullify
add_foreign_key
"ci_builds"
,
"ci_stages"
,
column:
"stage_id"
,
name:
"fk_3a9eaa254d"
,
on_delete: :cascade
add_foreign_key
"ci_builds"
,
"ci_stages"
,
column:
"stage_id"
,
name:
"fk_3a9eaa254d"
,
on_delete: :cascade
...
...
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