Freeside talk:1.7:Documentation:Upgrading
From Freeside
int->bigint for the byte counting stuff:
clear; t=svc_acct; for c in upbytes upbytes_threshold downbytes downbytes_threshold totalbytes totalbytes_threshold; do echo "ALTER TABLE $t ADD COLUMN ${c}_new bigint; UPDATE $t SET ${c}_new = CAST($c AS bigint); ALTER TABLE $t DROP COLUMN $c;
ALTER TABLE $t RENAME COLUMN ${c}_new TO $c; "; done
clear; t=prepay_credit; for c in upbytes downbytes totalbytes; do echo "ALTER TABLE $t ADD COLUMN ${c}_new bigint; UPDATE $t SET ${c}_new = CAST($c AS bigint); ALTER TABLE $t DROP COLUMN $c; ALTER TABLE $t RENAME COLUMN ${c}_new TO $c; "; done