Sha256: 850eca3fe09100b94554a71b70ef4886a1a24cfb083fc7f3b7327765803d9549

Contents?: true

Size: 272 Bytes

Versions: 7

Compression:

Stored size: 272 Bytes

Contents

class CreateCars < ActiveRecord::Migration
  def self.up
    create_table :cars do |t|
      t.string :name
      t.references :color
      t.references :feature, :class_name => 'Color', :polymorphic => true
    end
  end
  
  def self.down
    drop_table :cars
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
mschuerig-enumerate_by-0.4.2 test/app_root/db/migrate/002_create_cars.rb
pluginaweek-enumerate_by-0.4.2 test/app_root/db/migrate/002_create_cars.rb
pluginaweek-enumerate_by-0.4.3 test/app_root/db/migrate/002_create_cars.rb
enumerate_by-0.4.0 test/app_root/db/migrate/002_create_cars.rb
enumerate_by-0.4.1 test/app_root/db/migrate/002_create_cars.rb
enumerate_by-0.4.3 test/app_root/db/migrate/002_create_cars.rb
enumerate_by-0.4.2 test/app_root/db/migrate/002_create_cars.rb