Sha256: c9999309bc10cf4650729a21a80e5af37f7dcf9e18465c76c820a18e468c402a
Contents?: true
Size: 701 Bytes
Versions: 3
Compression:
Stored size: 701 Bytes
Contents
class <%= class_name %> < ActiveRecord::Migration def self.up create_table :audits, :force => true do |t| t.integer :auditable_id t.string :auditable_type t.integer :<%= human_model %>_id t.string :<%= human_model %>_type t.string :username t.string :action t.text :changes t.integer :version, :default => 0 t.datetime :created_at end add_index :audits, [:auditable_id, :auditable_type], :name => 'auditable_index' add_index :audits, [:<%= human_model %>_id, :<%= human_model %>_type], :name => '<%= human_model %>_index' add_index :audits, :created_at end def self.down drop_table :audits end end
Version data entries
3 entries across 3 versions & 1 rubygems