class CreateAnnoncePhotos < ActiveRecord::Migration
  def change
    create_table :annonce_photos do |t|
      t.references :annonce, index: true
      t.string :file
      t.string :title
      t.boolean :enabled
      t.boolean :moderated
      t.integer :position

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