class Coalitions < ActiveRecord::Migration
  def up
    create_table(:coalitions) do |t|
      t.string :name
      t.string :display_name
      t.text   :description
      t.string :permalink
      t.string :status
      t.string :profile_photo
      t.timestamps
    end
    
    add_index :coalitions, :name,        :unique => true
    add_index :coalitions, :permalink,   :unique => true

    add_column :groups, :coalition_id, :integer
  end

  def down
    drop_table :coalitions
    remove_column :groups, :coalition_id
  end
end