BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4d72ca39
Commit
4d72ca39
authored
Apr 13, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the use of default scope for Builds
parent
234be12e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
11 deletions
+0
-11
build.rb
app/models/ci/build.rb
+0
-11
schema.rb
db/schema.rb
+0
-0
No files found.
app/models/ci/build.rb
View file @
4d72ca39
...
...
@@ -37,8 +37,6 @@
module
Ci
class
Build
<
CommitStatus
LAZY_ATTRIBUTES
=
[
'trace'
]
belongs_to
:runner
,
class_name:
'Ci::Runner'
belongs_to
:trigger_request
,
class_name:
'Ci::TriggerRequest'
belongs_to
:erased_by
,
class_name:
'User'
...
...
@@ -56,20 +54,11 @@ module Ci
acts_as_taggable
# To prevent db load megabytes of data from trace
default_scope
->
{
select
(
Ci
::
Build
.
columns_without_lazy
)
}
before_destroy
{
project
}
after_create
:execute_hooks
class
<<
self
def
columns_without_lazy
(
column_names
-
LAZY_ATTRIBUTES
).
map
do
|
column_name
|
"
#{
table_name
}
.
#{
column_name
}
"
end
end
def
last_month
where
(
'created_at > ?'
,
Date
.
today
-
1
.
month
)
end
...
...
db/schema.rb
View file @
4d72ca39
This diff is collapsed.
Click to expand it.
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