-- Run this once, the same way you ran the original migration.sql (phpMyAdmin
-- in cPanel, or `mysql -u ... -p your_db < migration_usage.sql`), before
-- uploading login.php, verify.php, and report_usage.php. It only adds a
-- column; nothing existing is touched or dropped.
--
-- total_bytes_used is the account's approximate cumulative VPN usage, in
-- bytes. It starts at 0 for every existing account and only ever increases,
-- via report_usage.php. Because it lives here — on the account row, not on
-- the device — it is unaffected by the app being uninstalled and
-- reinstalled, or by the user switching phones.

ALTER TABLE users
    ADD COLUMN total_bytes_used BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER expires_at;
