Class: CreateImpexHistories

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/impex/templates/create_impex_history.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/impex/templates/create_impex_history.rb', line 2

def change
  create_table :impex_histories do |t|
    t.column :reference, :string
    t.column :table, :string

    t.column :key, :string
    t.column :value, :string
  end

  add_index(:impex_histories, [:reference, :table], order: {reference: :desc, table: :desc})
end