class CreateSocietes < ActiveRecord::Migration[6.0]
  def change
    create_table :societes do |t|
      t.string :socmanaginn
      t.string :nom
      t.string :adresse1
      t.string :adresse2
      t.string :codepostal
      t.string :ville
      t.string :pays
      t.string :numtel
      t.string :numfax
      t.string :mobile
      t.string :mail
      t.string :mailcc
      t.string :mailbcc
      t.string :siteweb
      t.string :statut
      t.string :rc
      t.string :naf
      t.string :soc_type
      t.string :enseigne
      t.datetime :datecreation
      t.string :activite1
      t.string :activite2
      t.string :activite3
      t.string :activite4
      t.string :activite5
      t.string :login
      t.string :password
      t.string :photo
      t.string :typeuser
      t.string :codeproprietaire
      t.string :typepartage
      t.string :libre1
      t.string :libre2
      t.string :libre3
      t.string :libre4
      t.string :libre5
      t.string :accesbloque
      t.string :corbeille
      t.string :codetpe
      t.string :codecreateur
      t.string :partagedefaut
      t.string :npai
      t.string :npaimail
      t.string :npaisms
      t.decimal :ac_rate, :precision => 14, :scale => 2
      t.decimal :cc_rate, :precision => 14, :scale => 2
      t.decimal :ac_cagnotte, :precision => 14, :scale => 2
      t.decimal :cc_cagnotte, :precision => 14, :scale => 2
      t.decimal :ac_cumul, :precision => 14, :scale => 2
      t.decimal :cc_cumul, :precision => 14, :scale => 2
      t.boolean :enabled, :default => false
      t.date :last_volume_at

      t.timestamps
    end
  end
end
