-
Notifications
You must be signed in to change notification settings - Fork 28
Create migration
kostyantyn edited this page Sep 3, 2012
·
1 revision
rails generate migration create_hydra_attributes
class CreateHydraAttributes < ActiveRecord::Migration
def up
create_hydra_entity :products do |t|
# add here all other columns that should be in the entity table
t.timestamps
end
end
def down
drop_hydra_entity :products
end
end
rails generate migration move_products_to_hydra_attributes
class MoveProductsToHydraAttributes < ActiveRecord::Migration
def up
migrate_to_hydra_entity :products
end
def down
rollback_from_hydra_entity :products
end
end