Finish database and config translation from Wobject/Product

to Sku/Product.  Now for the code.
This commit is contained in:
Colin Kuskie 2008-04-03 04:05:30 +00:00
parent c2951f9456
commit d1253c705f
2 changed files with 5 additions and 1 deletions

View file

@ -437,8 +437,12 @@ sub migrateOldProduct {
$fromWobject->finish;
$toSku->finish;
$rmWobject->finish;
$session->db->write(q!update asset set className='WebGUI::Asset::Sku::Product' where className='WebGUI::Asset::Wobject::Product'!);
## Remove productNumber from Product;
$session->db->write("alter table Product drop column productNumber");
## Update config file, deleting Wobject::Product and adding Sku::Product
$session->config->deleteFromArray('assets', 'WebGUI::Asset::Wobject::Product');
$session->config->addToArray('assets', 'WebGUI::Asset::Sku::Product');
return;
}

View file

@ -63,12 +63,12 @@ my $product2 = $root->addChild($properties2);
diag ref $product2;
$tag->commit;
sleep 2;
$tag = WebGUI::VersionTag->getWorking($session);
my $product1a = $product1->addRevision({price => 11.11});
sleep 1;
$tag->commit;
diag "Done.";