Skip to content

Commit

Permalink
Slapdash use of date vs. datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
friflaj committed Mar 18, 2011
1 parent 4395277 commit 0dfc007
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions db/migrate/014_fix_positions.rb
@@ -1,7 +1,7 @@
class FixPositions < ActiveRecord::Migration
def self.up
errors = []
Issue.find(:all, :conditions => "subject is NULL or (start_date is null and not due_date is null) or start_date > due_date or updated_on < created_on or start_date < created_on").each do |issue|
Issue.find(:all, :conditions => "subject is NULL or (start_date is null and not due_date is null) or start_date > due_date or updated_on < created_on").each do |issue|
errors << issue.id
end

Expand All @@ -11,7 +11,6 @@ def self.up
puts "* due date is set, but start date is not"
puts "* start date is later than due date"
puts "* updated-date is before created-date"
puts "* start date is before created-date"
raise "Please fix the issues with the follwing IDs and retry the migration"
errors.each {|id|
puts "- #{id}"
Expand Down

0 comments on commit 0dfc007

Please sign in to comment.