Sha256: 199c434d25ccfa53a4ef1a62cf5248bfebe20e50c70b3c5e3ad0eea5be733848
Contents?: true
Size: 524 Bytes
Versions: 3
Compression:
Stored size: 524 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, null: false t.decimal :coal_consumption, precision: 6, scale: 2, null: false end end def self.down drop_child :steam_locomotives drop_table :locomotives end end
Version data entries
3 entries across 3 versions & 1 rubygems