Sha256: b88a4f1cb2746921f8ceb53df8cf666cad245ace382d947736deadc1b650f08f
Contents?: true
Size: 434 Bytes
Versions: 30
Compression:
Stored size: 434 Bytes
Contents
class AddPublishedAtToContent < ActiveRecord::Migration class Content < ActiveRecord::Base include BareMigration end def self.up modify_tables_and_update(:add_column, Content, :published_at, :datetime) do |content| unless $schema_generator content.published_at = content.created_at end end end def self.down remove_column :contents, :published_at end end
Version data entries
30 entries across 30 versions & 1 rubygems