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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
b19b8c67
Commit
b19b8c67
authored
Feb 23, 2015
by
Marco Wessel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give last_activity_at a default value so it will always be set
parent
ebe0d341
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
CHANGELOG
CHANGELOG
+1
-0
app/models/project.rb
app/models/project.rb
+6
-0
db/migrate/20150223022001_set_missing_last_activity_at.rb
db/migrate/20150223022001_set_missing_last_activity_at.rb
+9
-0
db/schema.rb
db/schema.rb
+2
-2
No files found.
CHANGELOG
View file @
b19b8c67
...
...
@@ -3,6 +3,7 @@ v 7.9.0 (unreleased)
- Upgrade Rails gem to version 4.1.9.
- Improve UI for commits, issues and merge request lists
- Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
- Fix ordering of imported but unchanged projects (Marco Wessel)
v 7.8.0
- Fix access control and protection against XSS for note attachments and other uploads.
...
...
app/models/project.rb
View file @
b19b8c67
...
...
@@ -48,6 +48,12 @@ class Project < ActiveRecord::Base
default_value_for
:wall_enabled
,
false
default_value_for
:snippets_enabled
,
gitlab_config_features
.
snippets
# set last_activity_at to the same as updated_at
before_create
:set_last_activity_at
def
set_last_activity_at
self
.
last_activity_at
=
self
.
updated_at
end
ActsAsTaggableOn
.
strict_case_match
=
true
acts_as_taggable_on
:tags
...
...
db/migrate/20150223022001_set_missing_last_activity_at.rb
0 → 100644
View file @
b19b8c67
class
SetMissingLastActivityAt
<
ActiveRecord
::
Migration
def
up
execute
"UPDATE projects SET last_activity_at = updated_at WHERE last_activity_at IS NULL"
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/schema.rb
View file @
b19b8c67
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201502
13121042
)
do
ActiveRecord
::
Schema
.
define
(
version:
201502
23022001
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -334,12 +334,12 @@ ActiveRecord::Schema.define(version: 20150213121042) do
t
.
string
"import_url"
t
.
integer
"visibility_level"
,
default:
0
,
null:
false
t
.
boolean
"archived"
,
default:
false
,
null:
false
t
.
string
"avatar"
t
.
string
"import_status"
t
.
float
"repository_size"
,
default:
0.0
t
.
integer
"star_count"
,
default:
0
,
null:
false
t
.
string
"import_type"
t
.
string
"import_source"
t
.
string
"avatar"
end
add_index
"projects"
,
[
"created_at"
,
"id"
],
name:
"index_projects_on_created_at_and_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