Sha256: e5a2b13b44bd66ed4c09cfcc177928851a453a49fc54999077ecfc5cbb16dd49
Contents?: true
Size: 730 Bytes
Versions: 11
Compression:
Stored size: 730 Bytes
Contents
class CreatePersistenceTables < ActiveRecord::Migration def self.up create_table :calculations do |t| t.string "profile_uid" t.string "profile_item_uid" t.string "calculation_type" t.timestamps end create_table :terms do |t| t.integer "calculation_id" t.string "label" t.string "value" t.timestamps end add_index :calculations, :calculation_type add_index :calculations, :profile_item_uid add_index :terms, [:calculation_id, :label], :name => "calc_id_label_index" add_index :terms, [:label, :value, :calculation_id], :name => "label_name_calc_id_index" end def self.down drop_table :calculations drop_table :terms end end
Version data entries
11 entries across 11 versions & 1 rubygems