From e2722f58ee98e4af7b54dfa230f63520b1ba8558 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Apr 2015 10:16:29 +0100 Subject: [PATCH] Fix schema again --- synapse/storage/schema/full_schemas/11/transactions.sql | 4 ++-- synapse/storage/schema/full_schemas/11/users.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/storage/schema/full_schemas/11/transactions.sql b/synapse/storage/schema/full_schemas/11/transactions.sql index c3d46763a..093bb275b 100644 --- a/synapse/storage/schema/full_schemas/11/transactions.sql +++ b/synapse/storage/schema/full_schemas/11/transactions.sql @@ -29,7 +29,7 @@ CREATE INDEX IF NOT EXISTS transactions_have_ref ON received_transactions(origin -- Stores what transactions we've sent, what their response was (if we got one) and whether we have -- since referenced the transaction in another outgoing transaction CREATE TABLE IF NOT EXISTS sent_transactions( - id BIGINT PRIMARY KEY, -- This is used to apply insertion ordering + id BIGINT PRIMARY KEY AUTOINCREMENT, -- This is used to apply insertion ordering transaction_id VARCHAR(150), destination VARCHAR(150), response_code INTEGER DEFAULT 0, @@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS transaction_id_to_pdu( pdu_origin VARCHAR(150) ); -CREATE INDEX IF NOT EXISTS transaction_id_to_pdu_tx ON transaction_id_to_pdu(transaction_id, destination) +CREATE INDEX IF NOT EXISTS transaction_id_to_pdu_tx ON transaction_id_to_pdu(transaction_id, destination); CREATE INDEX IF NOT EXISTS transaction_id_to_pdu_dest ON transaction_id_to_pdu(destination); -- To track destination health diff --git a/synapse/storage/schema/full_schemas/11/users.sql b/synapse/storage/schema/full_schemas/11/users.sql index 94c91e529..e9a9fc94f 100644 --- a/synapse/storage/schema/full_schemas/11/users.sql +++ b/synapse/storage/schema/full_schemas/11/users.sql @@ -22,7 +22,7 @@ CREATE TABLE IF NOT EXISTS users( ); CREATE TABLE IF NOT EXISTS access_tokens( - id BIGINT PRIMARY KEY, + id BIGINT PRIMARY KEY AUTOINCREMENT, user_id VARCHAR(150) NOT NULL, device_id VARCHAR(150), token VARCHAR(150) NOT NULL,