maybe do this through a migration?

This commit is contained in:
Joe Sak 2011-07-18 15:24:30 -05:00
parent b78486ce1e
commit 5d493b154c

View file

@ -0,0 +1,12 @@
class AddPrimaryKeyToCategorizations < ActiveRecord::Migration
def self.up
unless ::Categorization.column_names.include?("id")
add_column :blog_categories_blog_posts, :id, :primary_key
end
end
def self.down
remove_column :blog_categories_blog_posts, :id
end
end