aboutsummaryrefslogblamecommitdiffstats
path: root/db/migrate/20130611193508_add_primary_key_to_categorizations.refinery_blog.rb
blob: f55b31403a7c3d22ccf43aa71fd33379fa7167a3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                       
# This migration comes from refinery_blog (originally 20110803223529)
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