Sha256: 4f18645edebf0a7bc9be21921a3d6b94b4d071f3182a4649c89ab6cdf85d460b
Contents?: true
Size: 1.24 KB
Versions: 8
Compression:
Stored size: 1.24 KB
Contents
class CreateFlavors < ActiveRecord::Migration def change create_table :flavors do |t| t.string :name t.float :hourly_rate t.float :ebs_optimized end [ ["c3.xlarge", 0.300, 0.02], ["c3.2xlarge", 0.600, 0.05], ["c3.4xlarge", 1.200, 0.10], ["c3.8xlarge", 2.400, 0.05], ["c1.medium", 0.145], ["c1.xlarge", 0.580], ["cc2.8xlarge", 2.400], ["g2.2xlarge", 0.650, 0.05], ["cg1.4xlarge", 2.100], ["m2.xlarge", 0.410], ["m2.2xlarge", 0.820, 0.025], ["m2.4xlarge", 1.640, 0.05], ["cr1.8xlarge", 3.500], ["i2.xlarge", 0.853, 0.02], ["i2.2xlarge", 1.705, 0.05], ["i2.4xlarge", 3.410, 0.10], ["i2.8xlarge", 6.820], ["hs1.8xlarge", 4.600], ["hi1.4xlarge", 3.100], ["t1.micro", 0.020], ["m3.xlarge", 0.450, 0.025], ["m3.2xlarge", 0.900, 0.05], ["m1.small", 0.060], ["m1.medium", 0.120], ["m1.large", 0.240, 0.025], ["m1.xlarge", 0.480, 0.05], ["c3.large", 0.150] ].each do |name, hourly_rate, ebs_optimized| ActiveRecord::Base.connection.execute("INSERT INTO flavors (name, hourly_rate, ebs_optimized) VALUES ('#{name}', #{hourly_rate}, #{ebs_optimized || 0})") end end end
Version data entries
8 entries across 8 versions & 1 rubygems