class CreateAnnonceAutos < ActiveRecord::Migration
  def change
    create_table :annonce_autos do |t|
      t.references :annonce, index: true
      t.string :marque
      t.integer :kms
      t.string :energie
      t.integer :cv
      t.string :bv
      t.boolean :first_hand
      t.boolean :gps
      t.boolean :fourmotion
      t.date :year
      t.boolean :attelage
      t.boolean :clim
      t.boolean :bluetooth

      t.timestamps null: false
    end
    add_foreign_key :annonce_autos, :annonces
  end
end
