vita_app/db/migrate/20160309104918_create_product_fdps.rb
Nicolas Bally 1d3af87d4c initial
2016-04-28 10:07:08 +02:00

20 lines
702 B
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class CreateProductFdps < ActiveRecord::Migration
def change
create_table :product_fdps do |t|
t.decimal :price, precision: 10, scale: 2
t.text :country
t.string :fdp_description
t.decimal :price_max, precision: 10, scale: 2
t.string :delais
t.timestamps null: false
end
ProductFdp.create(:fdp_description => "LIVRAISON EN FRANCE METROPOLITAINE ET CORSE", :price => 7, :price_max =>999999, :delais => "2 à 5 jours ouvrés", :country => "FR")
ProductFdp.create(:fdp_description => "LIVRAISON VERS L'OUTRE MER ET LINTERNATIONAL", :price => 15, :price_max => 999999, :delais => "5 à 10 jours ouvrés", :country => "all")
end
end