summary refs log tree commit diff
path: root/synapse/storage/schema/delta/16
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-10 11:22:04 +0100
committerErik Johnston <erik@matrix.org>2015-04-10 11:22:04 +0100
commit7e863c51e6a6a5b6f757cb279f5d7308db1432d4 (patch)
tree2b491a2422034b63b423ba11b59df0ebaa732a9c /synapse/storage/schema/delta/16
parentSQLite wants INTEGER and not BIGINT for primary keys (diff)
downloadsynapse-7e863c51e6a6a5b6f757cb279f5d7308db1432d4.tar.xz
Use unsigned bigint
Diffstat (limited to 'synapse/storage/schema/delta/16')
-rw-r--r--synapse/storage/schema/delta/16/users.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/schema/delta/16/users.sql b/synapse/storage/schema/delta/16/users.sql
index 1bbd1c0a17..f04705cd77 100644
--- a/synapse/storage/schema/delta/16/users.sql
+++ b/synapse/storage/schema/delta/16/users.sql
@@ -1,11 +1,11 @@
 -- Convert `access_tokens`.user from rowids to user strings.
 -- MUST BE DONE BEFORE REMOVING ID COLUMN FROM USERS TABLE BELOW
 CREATE TABLE IF NOT EXISTS new_access_tokens(
-    id BIGINT PRIMARY KEY,
+    id BIGINT UNSIGNED PRIMARY KEY,
     user_id VARCHAR(150) NOT NULL,
     device_id VARCHAR(150),
     token VARCHAR(150) NOT NULL,
-    last_used BIGINT,
+    last_used BIGINT UNSIGNED,
     UNIQUE(token)
 );
 
@@ -22,7 +22,7 @@ ALTER TABLE new_access_tokens RENAME TO access_tokens;
 CREATE TABLE IF NOT EXISTS new_users(
     name VARCHAR(150),
     password_hash VARCHAR(150),
-    creation_ts BIGINT,
+    creation_ts BIGINT UNSIGNED,
     admin BOOL DEFAULT 0 NOT NULL,
     UNIQUE(name)
 );
@@ -41,7 +41,7 @@ CREATE TABLE IF NOT EXISTS new_user_ips (
     device_id VARCHAR(150),
     ip VARCHAR(150) NOT NULL,
     user_agent VARCHAR(150) NOT NULL,
-    last_seen BIGINT NOT NULL
+    last_seen BIGINT UNSIGNED NOT NULL
 );
 
 INSERT INTO new_user_ips