class AddElementsToPComptaElements < ActiveRecord::Migration[6.0]
  def change
    add_column :p_compta_elements, :cc_element_date, :date
    add_column :p_compta_elements, :ac_element_date, :date
    add_column :p_compta_elements, :cc_solde, :boolean
    add_column :p_compta_elements, :ac_solde, :boolean
    add_column :p_compta_elements, :ac_amount, :decimal,   :precision => 14,   :scale => 2
    add_column :p_compta_elements, :cc_amount, :decimal,   :precision => 14,   :scale => 2
    remove_column :p_compta_elements, :amount, :decimal
    remove_column :p_compta_elements, :solde, :boolean
    remove_column :p_compta_elements, :date, :date
  end
end
