-- integrating scores, modify users table to:
-- todo state should be region, country should be countrycode, lat, lng should be latitude, longitude
-- add addr, locidispid
-- these fields will be updated on login to reflect the last connection details

ALTER TABLE users ADD COLUMN addr BIGINT;
ALTER TABLE users ADD COLUMN locidispid INTEGER;

ALTER TABLE users ALTER COLUMN addr SET DEFAULT 0;
ALTER TABLE users ALTER COLUMN locidispid SET DEFAULT 0;

UPDATE users SET addr = 0, locidispid = 0;

ALTER TABLE users ALTER COLUMN addr SET NOT NULL;
ALTER TABLE users ALTER COLUMN locidispid SET NOT NULL;
