aboutsummaryrefslogblamecommitdiffstats
path: root/db/migrate/20110803223529_add_primary_key_to_categorizations.rb
blob: 5bbfcf38db162698b13833b98725ed50db32e415 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                                              


                                                                       


       



                                                            


     
class AddPrimaryKeyToCategorizations < ActiveRecord::Migration
  def up
    unless Refinery::Categorization.column_names.include?("id")
      add_column Refinery::Categorization.table_name, :id, :primary_key
    end
  end

  def down
    if Refinery::Categorization.column_names.include?("id")
      remove_column Refinery::Categorization.table_name, :id
    end
  end
end