Sha256: a965b76f63150b5cb66a99a7d29b587854d05ba62acc2de5a89cc64d18c265c8
Contents?: true
Size: 375 Bytes
Versions: 1
Compression:
Stored size: 375 Bytes
Contents
class DeathAndTaxesMigration < ActiveRecord::Migration def self.up create_table :taxations do |t| t.references :taxable, :polymorphic => true t.integer :amount t.float :percentage t.string :level t.string :name end add_index :taxations, [:taxable_id, :taxable_type] end def self.down drop_table :taxations end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
death_and_taxes-0.0.0 | lib/generators/death_and_taxes/migration/templates/active_record/migration.rb |