Archived
maybe I should add migrations...
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
class AddTimestampsToInfo < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :info, :created_at, :datetime
|
||||||
|
add_column :info, :updated_at, :datetime
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user