Sha256: 08b8ae2ac3c743b22d06cae8c75b399775927238fed7b7913074f41406df0175

Contents?: true

Size: 327 Bytes

Versions: 10

Compression:

Stored size: 327 Bytes

Contents

class CreateItems < ActiveRecord::Migration
  def self.up
    create_table :items do |t|
      t.string :name
      t.decimal :price

      t.timestamps
    end
    Item.create :name => "Rest in practice", :price => 400.0
    Item.create :name => "Calpis", :price => 10.0
  end

  def self.down
    drop_table :items
  end
end

Version data entries

10 entries across 5 versions & 2 rubygems

Version Path
restfulie-nosqlite-1.0.4 full-examples/rest_from_scratch/part_2/db/migrate/20100830171258_create_items.rb
restfulie-nosqlite-1.0.4 full-examples/rest_from_scratch/part_3/db/migrate/20100830171258_create_items.rb
restfulie-1.1.1 full-examples/rest_from_scratch/part_3/db/migrate/20100830171258_create_items.rb
restfulie-1.1.1 full-examples/rest_from_scratch/part_2/db/migrate/20100830171258_create_items.rb
restfulie-1.1.0 full-examples/rest_from_scratch/part_2/db/migrate/20100830171258_create_items.rb
restfulie-1.1.0 full-examples/rest_from_scratch/part_3/db/migrate/20100830171258_create_items.rb
restfulie-nosqlite-1.0.3 full-examples/rest_from_scratch/part_2/db/migrate/20100830171258_create_items.rb
restfulie-nosqlite-1.0.3 full-examples/rest_from_scratch/part_3/db/migrate/20100830171258_create_items.rb
restfulie-1.0.3 full-examples/rest_from_scratch/part_3/db/migrate/20100830171258_create_items.rb
restfulie-1.0.3 full-examples/rest_from_scratch/part_2/db/migrate/20100830171258_create_items.rb