finished sku base class

This commit is contained in:
JT Smith 2008-02-25 20:27:21 +00:00
parent 1d8461aa02
commit 032617a8ba
4 changed files with 172 additions and 47 deletions

View file

@ -27,10 +27,28 @@ my $session = start(); # this line required
insertCommerceTaxTable($session);
insertCommerceShipDriverTable($session);
migrateToNewCart($session);
createSkuAsset($session);
finish($session); # this line required
#-------------------------------------------------
sub createSkuAsset {
my $session = shift;
print "\tCreate SKU asset.\n" unless ($quiet);
$session->db->write("create table sku (
assetId varchar(22) binary not null,
revisionDate bigint not null,
sku varchar(35) binary not null,
salesAgentId varchar(22) binary,
overrideTaxRate int not null default 0,
taxRateOverride float not null default 0.00,
primary key (assetId, revisionDate),
unique key sku (sku),
index vendorId (vendorId)
)");
}
#-------------------------------------------------
sub migrateToNewCart {
my $session = shift;