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