Sha256: 1451075560e3077116d549d7a4214b32091723e864c48b203a2f9ff2bbbe74b7
Contents?: true
Size: 523 Bytes
Versions: 4
Compression:
Stored size: 523 Bytes
Contents
# coding: utf-8 class ActsAsFootprintableMigration < ActiveRecord::Migration def self.up create_table :footprints do |t| t.references :footprintable, :polymorphic => true t.references :footprinter, :polymorphic => true t.timestamps :null => false end if ActiveRecord::VERSION::MAJOR < 4 add_index :footprints, [:footprintable_id, :footprintable_type] add_index :footprints, [:footprinter_id, :footprinter_type] end end def self.down drop_table :footprints end end
Version data entries
4 entries across 4 versions & 1 rubygems