1
2
3
4
5
6
7
8
9
10
|
class AddAcceptProductsToCategories < ActiveRecord::Migration
def self.up
add_column :categories, :accept_products, :boolean, :default => true
execute 'UPDATE categories SET accept_products = (1 > 0)'
end
def self.down
remove_column :categories, :accept_products
end
end
|