maybe I should add migrations...

This commit is contained in:
jomo
2015-04-24 00:43:29 +02:00
parent 542b235f23
commit d1c360959f
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
class AddTimestampsToInfo < ActiveRecord::Migration
def change
add_column :info, :created_at, :datetime
add_column :info, :updated_at, :datetime
end
end

View File

@@ -0,0 +1,7 @@
class AddTimestampsToExistingInfo < ActiveRecord::Migration
def change
Info.all.each do |i|
i.update_attributes(created_at: Time.now)
end
end
end