Sha256: 56c0f2e50768567720f79ed379d7b6fc03dfc4445d28d1845e8cc92fb82cac81
Contents?: true
Size: 555 Bytes
Versions: 5
Compression:
Stored size: 555 Bytes
Contents
class UpdateAuditsTable < ActiveRecord::Migration def self.up unless Audit.column_names.include?("comment") add_column :audits, :comment, :string add_column :audits, :auditable_parent_id, :integer add_column :audits, :auditable_parent_type, :string add_index :audits, [:auditable_parent_id, :auditable_parent_type], :name => 'auditable_parent_index' end end def self.down remove_column :audits, :comment remove_column :audits, :auditable_parent_id remove_column :audits, :auditable_parent_type end end
Version data entries
5 entries across 5 versions & 1 rubygems