Skip to content

Commit

Permalink
Fixes #10879 - reported_at column is NOT NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Jun 24, 2015
1 parent b95c1e1 commit 9bc4e53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions db/migrate/20150622090115_change_reported_at.rb
@@ -0,0 +1,10 @@
class ChangeReportedAt < ActiveRecord::Migration
def up
Report.where(:reported_at => nil).update_all(:reported_at => Time.at(0))
change_column :reports, :reported_at, :datetime, :null => false
end

def down
change_column :reports, :reported_at, :datetime, :null => true
end
end

0 comments on commit 9bc4e53

Please sign in to comment.