Sha256: e31794d6a578ab2e7184a84f7e9ff2d272aaabe754136e79b06cc349b2fe5662

Contents?: true

Size: 648 Bytes

Versions: 11

Compression:

Stored size: 648 Bytes

Contents

class CreateRecordHistories < ActiveRecord::Migration
  def self.up
    create_table  :record_histories do |t|
      t.string    :item_type, :null => false
      t.integer   :item_id,   :null => false
      t.string    :attr_name
      t.text      :old_value_dump
      t.text      :new_value_dump
      t.string    :author_type
      t.integer   :author_id
      t.datetime  :created_at
    end
    add_index :record_histories, [:item_type, :item_id, :attr_name]
    add_index :record_histories, [:item_type, :item_id]
    add_index :record_histories, [:author_type, :author_id]
  end

  def self.down
    drop_table :record_histories
  end
end


Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
record_history-0.9.2 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.9.1 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.9.0 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.9 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.8 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.7 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.6 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.5 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.4 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.3 lib/generators/record_history/templates/create_record_histories.rb
record_history-0.8.2 lib/generators/record_history/templates/create_record_histories.rb