Sha256: 0870cde16960c42030ee80d733f927b16c4ea7ba0a20544f0f158cc3e2320664

Contents?: true

Size: 518 Bytes

Versions: 12

Compression:

Stored size: 518 Bytes

Contents

class CreateWithDefaultTable < ActiveRecord::Migration
  def self.up
    create_table :locomotives do |t|
      t.column :name, :string
      t.column :max_speed, :integer
      t.column :type, :string
    end
    
    create_child(:steam_locomotives, :parent => :locomotives) do |t|
      t.decimal :water_consumption, :precision => 6, :scale => 2
      t.decimal :coal_consumption,  :precision => 6, :scale => 2
    end
  end
  
  def self.down
    drop_child :steam_locomotives
    drop_table :locomotives
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
updateable_views_inheritance-1.4.5 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.4.4 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.4.3 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.4.2 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.4.1 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.4.0 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.3.0 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.2.2 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.2.1 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.2.0 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.1.2 test/fixtures/migrations/2_create_with_default_table.rb
updateable_views_inheritance-1.1.1 test/fixtures/migrations/2_create_with_default_table.rb