Finish database and config translation from Wobject/Product
to Sku/Product. Now for the code.
This commit is contained in:
parent
c2951f9456
commit
d1253c705f
2 changed files with 5 additions and 1 deletions
|
|
@ -437,8 +437,12 @@ sub migrateOldProduct {
|
||||||
$fromWobject->finish;
|
$fromWobject->finish;
|
||||||
$toSku->finish;
|
$toSku->finish;
|
||||||
$rmWobject->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;
|
## Remove productNumber from Product;
|
||||||
|
$session->db->write("alter table Product drop column productNumber");
|
||||||
## Update config file, deleting Wobject::Product and adding Sku::Product
|
## 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,12 +63,12 @@ my $product2 = $root->addChild($properties2);
|
||||||
diag ref $product2;
|
diag ref $product2;
|
||||||
|
|
||||||
$tag->commit;
|
$tag->commit;
|
||||||
|
sleep 2;
|
||||||
|
|
||||||
$tag = WebGUI::VersionTag->getWorking($session);
|
$tag = WebGUI::VersionTag->getWorking($session);
|
||||||
|
|
||||||
my $product1a = $product1->addRevision({price => 11.11});
|
my $product1a = $product1->addRevision({price => 11.11});
|
||||||
|
|
||||||
sleep 1;
|
|
||||||
$tag->commit;
|
$tag->commit;
|
||||||
|
|
||||||
diag "Done.";
|
diag "Done.";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue