migrateでdefaultがcurrent_timestampできなかった
なんで、生SQLでとりあえず。。。
class AddColumnHogeTable< ActiveRecord::Migration def self.up execute <<-SQL ALTER TABLE hoge_table ADD created timestamp NOT NULL DEFAULT current_timestamp ; SQL end def self.down remove_column :hoge_table , :created end end