Freeside talk:1.7:Documentation:Upgrading

From Freeside
Revision as of 02:42, 10 January 2007 by Ivan (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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