2009-06-01から1日間の記事一覧
なんで、生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 …
なんで、生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 …