class CreatePDevises < ActiveRecord::Migration[6.0]
  def change
    create_table :p_devises do |t|
      t.string :name
      t.string :symbol
      t.decimal :rate,   :precision => 14,   :scale => 7
      

      t.timestamps
    end
    
    PDevise.create(:name => "Euro", :symbol => "€", :rate => 1.0)
    PDevise.create(:name => "Franc suisse", :symbol => "CHF", :rate => 0.923945)
  end
end
