class CreateTimelineContents < ActiveRecord::Migration
  def change
    create_table :timeline_contents do |t|
      t.references :image_file, index: true
      t.string :title
      t.integer :position
      t.text :content
      t.references :timeline_year, index: true

      t.timestamps null: false
    end
    add_foreign_key :timeline_contents, :image_files
    add_foreign_key :timeline_contents, :timeline_years
  end
end
