Sha256: 659dec0599966148d8de7772d67d8d35d915cf05ed2ec22ee524253d1432db13

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

class CreateVersions < ActiveRecord::Migration
  def self.up
    create_table :versions do |t|
      t.string   :item_type, :null => false
      t.integer  :item_id,   :null => false
      t.string   :event,     :null => false
      t.string   :whodunnit
      t.text     :object
      t.text     :columns
      t.datetime :created_at
    end
    add_index :versions, [:item_type, :item_id]
  end

  def self.down
    remove_index :versions, [:item_type, :item_id]
    drop_table :versions
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bkwld-paper_trail-2.3.3 lib/generators/paper_trail/templates/create_versions.rb
bkwld-paper_trail-2.3.2 lib/generators/paper_trail/templates/create_versions.rb