diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-28 12:41:33 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-28 12:41:33 +0100 |
commit | 18f82477011ee9279bde8ad995d654c116d3f652 (patch) | |
tree | e7f351c8597515399195754507e777050ade8016 /synapse/storage/schema/delta/16 | |
parent | Correctly handle total/remaining counts in the presence of sent_transasctions... (diff) | |
download | synapse-18f82477011ee9279bde8ad995d654c116d3f652.tar.xz |
Use TEXT instead of VARCHAR(n), since PostgreSQL treats them the same except for a limit
Diffstat (limited to 'synapse/storage/schema/delta/16')
-rw-r--r-- | synapse/storage/schema/delta/16/users.sql | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/synapse/storage/schema/delta/16/users.sql b/synapse/storage/schema/delta/16/users.sql index db27bdca02..cd0709250d 100644 --- a/synapse/storage/schema/delta/16/users.sql +++ b/synapse/storage/schema/delta/16/users.sql @@ -2,9 +2,9 @@ -- MUST BE DONE BEFORE REMOVING ID COLUMN FROM USERS TABLE BELOW CREATE TABLE IF NOT EXISTS new_access_tokens( id BIGINT UNSIGNED PRIMARY KEY, - user_id VARCHAR(150) NOT NULL, - device_id VARCHAR(150), - token VARCHAR(150) NOT NULL, + user_id TEXT NOT NULL, + device_id TEXT, + token TEXT NOT NULL, last_used BIGINT UNSIGNED, UNIQUE(token) ); @@ -20,8 +20,8 @@ ALTER TABLE new_access_tokens RENAME TO access_tokens; -- Remove ID column from `users` table CREATE TABLE IF NOT EXISTS new_users( - name VARCHAR(150), - password_hash VARCHAR(150), + name TEXT, + password_hash TEXT, creation_ts BIGINT UNSIGNED, admin BOOL DEFAULT 0 NOT NULL, UNIQUE(name) @@ -36,11 +36,11 @@ ALTER TABLE new_users RENAME TO users; -- Remove UNIQUE constraint from `user_ips` table CREATE TABLE IF NOT EXISTS new_user_ips ( - user_id VARCHAR(150) NOT NULL, - access_token VARCHAR(150) NOT NULL, - device_id VARCHAR(150), - ip VARCHAR(150) NOT NULL, - user_agent VARCHAR(150) NOT NULL, + user_id TEXT NOT NULL, + access_token TEXT NOT NULL, + device_id TEXT, + ip TEXT NOT NULL, + user_agent TEXT NOT NULL, last_seen BIGINT UNSIGNED NOT NULL ); |