aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate/20110803223529_add_primary_key_to_categorizations.rb
blob: dcf1493be160ab5b145970b7878874b72eafe243 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class AddPrimaryKeyToCategorizations < ActiveRecord::Migration
  def up
    unless Refinery::Blog::Categorization.column_names.include?("id")
      add_column Refinery::Blog::Categorization.table_name, :id, :primary_key
    end
  end

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