cirandas.net

ref: master

db/migrate/031_add_timestamps_in_product.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
class AddTimestampsInProduct < ActiveRecord::Migration
  def self.up
    add_column :products, :created_at, :datetime
    add_column :products, :updated_at, :datetime
  end

  def self.down
    remove_column :products, :created_at
    remove_column :products, :updated_at
  end
end