Answers for "how to add timestampe"

0

how do I add timestamps to a table

class AddTimestampsToUser < ActiveRecord::Migration
  def change_table
    add_column :users, :created_at, :datetime, null: false
    add_column :users, :updated_at, :datetime, null: false
  end
end
Posted by: Guest on March-04-2020

Browse Popular Code Answers by Language