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
cff9ff4b
Commit
cff9ff4b
authored
Jul 28, 2018
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EE fixes
parent
09348ff8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
0 deletions
+25
-0
app/models/resource_label_event.rb
app/models/resource_label_event.rb
+2
-0
db/migrate/20180726172057_create_resource_label_events.rb
db/migrate/20180726172057_create_resource_label_events.rb
+1
-0
db/schema.rb
db/schema.rb
+3
-0
ee/app/models/ee/epic.rb
ee/app/models/ee/epic.rb
+1
-0
ee/app/models/ee/resource_label_event.rb
ee/app/models/ee/resource_label_event.rb
+18
-0
No files found.
app/models/resource_label_event.rb
View file @
cff9ff4b
class
ResourceLabelEvent
<
ActiveRecord
::
Base
class
ResourceLabelEvent
<
ActiveRecord
::
Base
prepend
EE
::
ResourceLabelEvent
ISSUABLE_COLUMNS
=
%i(issue_id merge_request_id)
.
freeze
ISSUABLE_COLUMNS
=
%i(issue_id merge_request_id)
.
freeze
belongs_to
:user
belongs_to
:user
...
...
db/migrate/20180726172057_create_resource_label_events.rb
View file @
cff9ff4b
...
@@ -8,6 +8,7 @@ class CreateResourceLabelEvents < ActiveRecord::Migration
...
@@ -8,6 +8,7 @@ class CreateResourceLabelEvents < ActiveRecord::Migration
t
.
integer
:action
,
null:
false
t
.
integer
:action
,
null:
false
t
.
references
:issue
,
null:
true
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
t
.
references
:issue
,
null:
true
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
t
.
references
:merge_request
,
null:
true
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
t
.
references
:merge_request
,
null:
true
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
t
.
references
:epic
,
null:
true
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
t
.
references
:label
,
index:
true
,
foreign_key:
{
on_delete: :nullify
}
t
.
references
:label
,
index:
true
,
foreign_key:
{
on_delete: :nullify
}
t
.
references
:user
,
index:
true
,
foreign_key:
{
on_delete: :nullify
}
t
.
references
:user
,
index:
true
,
foreign_key:
{
on_delete: :nullify
}
t
.
datetime_with_timezone
:created_at
,
null:
false
t
.
datetime_with_timezone
:created_at
,
null:
false
...
...
db/schema.rb
View file @
cff9ff4b
...
@@ -2361,11 +2361,13 @@ ActiveRecord::Schema.define(version: 20180726172057) do
...
@@ -2361,11 +2361,13 @@ ActiveRecord::Schema.define(version: 20180726172057) do
t
.
integer
"action"
,
null:
false
t
.
integer
"action"
,
null:
false
t
.
integer
"issue_id"
t
.
integer
"issue_id"
t
.
integer
"merge_request_id"
t
.
integer
"merge_request_id"
t
.
integer
"epic_id"
t
.
integer
"label_id"
t
.
integer
"label_id"
t
.
integer
"user_id"
t
.
integer
"user_id"
t
.
datetime_with_timezone
"created_at"
,
null:
false
t
.
datetime_with_timezone
"created_at"
,
null:
false
end
end
add_index
"resource_label_events"
,
[
"epic_id"
],
name:
"index_resource_label_events_on_epic_id"
,
using: :btree
add_index
"resource_label_events"
,
[
"issue_id"
],
name:
"index_resource_label_events_on_issue_id"
,
using: :btree
add_index
"resource_label_events"
,
[
"issue_id"
],
name:
"index_resource_label_events_on_issue_id"
,
using: :btree
add_index
"resource_label_events"
,
[
"label_id"
],
name:
"index_resource_label_events_on_label_id"
,
using: :btree
add_index
"resource_label_events"
,
[
"label_id"
],
name:
"index_resource_label_events_on_label_id"
,
using: :btree
add_index
"resource_label_events"
,
[
"merge_request_id"
],
name:
"index_resource_label_events_on_merge_request_id"
,
using: :btree
add_index
"resource_label_events"
,
[
"merge_request_id"
],
name:
"index_resource_label_events_on_merge_request_id"
,
using: :btree
...
@@ -3031,6 +3033,7 @@ ActiveRecord::Schema.define(version: 20180726172057) do
...
@@ -3031,6 +3033,7 @@ ActiveRecord::Schema.define(version: 20180726172057) do
add_foreign_key
"push_rules"
,
"projects"
,
name:
"fk_83b29894de"
,
on_delete: :cascade
add_foreign_key
"push_rules"
,
"projects"
,
name:
"fk_83b29894de"
,
on_delete: :cascade
add_foreign_key
"releases"
,
"projects"
,
name:
"fk_47fe2a0596"
,
on_delete: :cascade
add_foreign_key
"releases"
,
"projects"
,
name:
"fk_47fe2a0596"
,
on_delete: :cascade
add_foreign_key
"remote_mirrors"
,
"projects"
,
name:
"fk_43a9aa4ca8"
,
on_delete: :cascade
add_foreign_key
"remote_mirrors"
,
"projects"
,
name:
"fk_43a9aa4ca8"
,
on_delete: :cascade
add_foreign_key
"resource_label_events"
,
"epics"
,
on_delete: :cascade
add_foreign_key
"resource_label_events"
,
"issues"
,
on_delete: :cascade
add_foreign_key
"resource_label_events"
,
"issues"
,
on_delete: :cascade
add_foreign_key
"resource_label_events"
,
"labels"
,
on_delete: :nullify
add_foreign_key
"resource_label_events"
,
"labels"
,
on_delete: :nullify
add_foreign_key
"resource_label_events"
,
"merge_requests"
,
on_delete: :cascade
add_foreign_key
"resource_label_events"
,
"merge_requests"
,
on_delete: :cascade
...
...
ee/app/models/ee/epic.rb
View file @
cff9ff4b
...
@@ -9,6 +9,7 @@ module EE
...
@@ -9,6 +9,7 @@ module EE
include
Noteable
include
Noteable
include
Referable
include
Referable
include
Awardable
include
Awardable
include
LabelEventable
belongs_to
:assignee
,
class_name:
"User"
belongs_to
:assignee
,
class_name:
"User"
belongs_to
:group
belongs_to
:group
...
...
ee/app/models/ee/resource_label_event.rb
0 → 100644
View file @
cff9ff4b
module
EE
module
ResourceLabelEvent
extend
ActiveSupport
::
Concern
extend
::
Gitlab
::
Utils
::
Override
EE_ISSUABLE_COLUMNS
=
%i(epic_id)
.
freeze
override
:issuable
def
issuable
epic
||
super
end
override
:issuable_columns
def
issuable_columns
EE_ISSUABLE_COLUMNS
+
super
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