class CreatePComptaElements < ActiveRecord::Migration[6.0] def change create_table :p_compta_elements do |t| t.string :element_type t.references :element, index: true t.references :p_customer, index: true t.datetime :date t.decimal :amount, :precision => 14, :scale => 2 t.boolean :solde, :default => false t.timestamps end end end