class CreateAnnonceOptionLogs < ActiveRecord::Migration
  def change
    create_table :annonce_option_logs do |t|
      t.references :annonce, index: true
      t.references :annonce_option_type, index: true
      t.integer :cost
      t.string :name
      t.integer :periode
      t.integer :periode_type

      t.timestamps null: false
    end
    add_foreign_key :annonce_option_logs, :annonces
    add_foreign_key :annonce_option_logs, :annonce_option_types
  end
end
