Class: PrefactoryLookup

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/prefactory/prefactory_lookup.rb

Class Method Summary collapse

Class Method Details

.create_tableObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/prefactory/prefactory_lookup.rb', line 2

def self.create_table
  conn = ActiveRecord::Base.connection
  conn.create_table :prefactory_lookups, :force => true do |t|
    t.column :key, :string
    t.column :result_class, :string
    t.column :result_id, :integer
    t.column :result_value, :text
    t.index [:key], :unique => true
  end
end