Sha256: 9732205e7e78af5099945134458490060c580a365423c5c3a70602b04ca70712
Contents?: true
Size: 325 Bytes
Versions: 58
Compression:
Stored size: 325 Bytes
Contents
class MessageSentDate < ActiveRecord::Migration def self.up add_column :messages, :sent_at, :datetime Message.reset_column_information Message.all.each { |message| message.sent_at = message.updated_at || message.created_at; message.save! } end def self.down remove_column :messages, :sent_at end end
Version data entries
58 entries across 58 versions & 1 rubygems