X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-upgrade;h=198d03ead8b6ad00307ea5b2f02bfc047d6892e0;hb=a179189cab28d3c1b7ae0101df5c1a95c4a72003;hp=b2cd3db49cfce9af6e67f7cb5b3472a5d9dae3e2;hpb=dc0f1291d98ac8f8d5b5da9465ab282f36c90034;p=freeside.git diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade index b2cd3db49..198d03ead 100755 --- a/FS/bin/freeside-upgrade +++ b/FS/bin/freeside-upgrade @@ -94,10 +94,19 @@ if ( dbdef->table('areacode') and } if ( dbdef->table('upgrade_journal') ) { - push @bugfix, "SELECT SETVAL( 'upgrade_journal_upgradenum_seq', - ( SELECT MAX(upgradenum) FROM upgrade_journal ) - ) - "; + if ( driver_name =~ /^Pg/i ) { + push @bugfix, " + SELECT SETVAL( 'upgrade_journal_upgradenum_seq', + ( SELECT MAX(upgradenum) FROM upgrade_journal ) + ) + "; + #MySQL can't do this in a statement so have to do it manually + #} elsif ( driver_name =~ /^mysql/i ) { + # push @bugfix, " + # ALTER TABLE upgrade_journal AUTO_INCREMENT = + # ( ( SELECT MAX(upgradenum) FROM upgrade_journal ) + 1 ) + # "; + } } if ( $DRY_RUN ) { @@ -456,14 +465,13 @@ Also performs other upgrade functions: current default. [ -s ]: Schema changes only. Useful for Pg/slony slaves where the data + changes will be replicated from the Pg/slony master. [ -r ]: Skip sqlradius updates. Useful for occassions where the sqlradius databases may be inaccessible. [ -c ]: Skip cdr and h_cdr updates. - changes will be replicated from the Pg/slony master. - [ -j ]: Run certain upgrades asychronously from the job queue. Currently used only for the 2.x -> 3.x cust_location, cust_pay and part_pkg upgrades. This may cause odd behavior before the upgrade is