Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api] store explicit last issue update time
- Loading branch information
1 parent
77c02dd
commit 9b60fea
Showing
4 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class AddUpdateTimestamp < ActiveRecord::Migration | ||
def self.up | ||
add_column :issue_trackers, :issues_updated, :integer | ||
end | ||
|
||
def self.down | ||
remove_column :issue_trackers, :issues_updated | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
src/api/db/migrate/20120119204301_set_current_time_as_updated.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class SetCurrentTimeAsUpdated < ActiveRecord::Migration | ||
def self.up | ||
IssueTracker.find(:all).each do |t| | ||
t.issues_updated=Time.now unless t.issues_updated | ||
t.save | ||
end | ||
end | ||
|
||
def self.down | ||
end | ||
end |