class CreateSeasons < ActiveRecord::Migration
  def change
    create_table :seasons do |t|
      t.integer :series_id, null: false
      t.string :title, limit: 64, null: false
      t.string :short_description, limit: 255, null: false
      t.text :description, null: true
      t.integer :order, limit: 1, null: false, default: 0

      t.timestamps null: false
      t.datetime :deleted_at, null: true
    end

    add_foreign_key :seasons, :series, name: :fk_rails_seasons_series
  end
end
