X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUpgrade.pm;h=a11945f268a60b43aa388e93621961dd1f07aa24;hb=abe19baf7f5c0e1df1aed23e047d4250fec7b75b;hp=e5cd5d32ba1e51402343408fa17b83627236b493;hpb=947c1f964f1304242f8a6ffabacccf040f1d505e;p=freeside.git diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index e5cd5d32b..a11945f26 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -42,6 +42,10 @@ sub upgrade { my $data = upgrade_data(%opt); + my $oldAutoCommit = $FS::UID::AutoCommit; + local $FS::UID::AutoCommit = 0; + local $FS::UID::AutoCommit = 0; + foreach my $table ( keys %$data ) { my $class = "FS::$table"; @@ -53,13 +57,10 @@ sub upgrade { my $start = time; - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - $FS::UID::AutoCommit = 0; - $class->_upgrade_data(%opt); if ( $oldAutoCommit ) { + warn " committing\n"; dbh->commit or die dbh->errstr; } @@ -99,7 +100,6 @@ sub upgrade_data { #reason type and reasons 'reason_type' => [], - 'reason' => [], 'cust_pkg_reason' => [], #need part_pkg before cust_credit... @@ -126,18 +126,37 @@ sub upgrade_data { #usage_classes if we have none 'usage_class' => [], + #phone_type if we have none + 'phone_type' => [], + #fixup access rights 'access_right' => [], - #change tax_rate column types - 'tax_rate' => [], - #change recur_flat and enable_prorate 'part_pkg_option' => [], #add weights to pkg_category 'pkg_category' => [], + #cdrbatch fixes + 'cdr' => [], + + #otaker->usernum + 'cust_attachment' => [], + #'cust_credit' => [], + #'cust_main' => [], + 'cust_main_note' => [], + #'cust_pay' => [], + 'cust_pay_void' => [], + 'cust_pkg' => [], + #'cust_pkg_reason' => [], + 'cust_pkg_discount' => [], + 'cust_refund' => [], + 'banned_pay' => [], + + #default namespace + 'payment_gateway' => [], + ; \%hash;