summary refs log tree commit diff
path: root/synapse/storage/schema/delta
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-03-31 12:07:56 +0100
committerKegan Dougal <kegan@matrix.org>2015-03-31 12:07:56 +0100
commitc217504949a90712f41a0422215f923b4d114a17 (patch)
tree18faee338e1df4139394066673ebb9d8fd547a82 /synapse/storage/schema/delta
parentFix tests and missing returns on deferreds. (diff)
downloadsynapse-c217504949a90712f41a0422215f923b4d114a17.tar.xz
Edit SQL schema to use string IDs not ints. Use token as ID. Update tests.
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/15/appservice_txns.sql7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/schema/delta/15/appservice_txns.sql b/synapse/storage/schema/delta/15/appservice_txns.sql
index 13bbb2de2e..2b27e2a429 100644
--- a/synapse/storage/schema/delta/15/appservice_txns.sql
+++ b/synapse/storage/schema/delta/15/appservice_txns.sql
@@ -14,14 +14,13 @@
  */
 
 CREATE TABLE IF NOT EXISTS application_services_state(
-    as_id INTEGER PRIMARY KEY,
+    as_id TEXT PRIMARY KEY,
     state TEXT,
-    last_txn TEXT,
-    FOREIGN KEY(as_id) REFERENCES application_services(id)
+    last_txn TEXT
 );
 
 CREATE TABLE IF NOT EXISTS application_services_txns(
-    as_id INTEGER NOT NULL,
+    as_id TEXT NOT NULL,
     txn_id INTEGER NOT NULL,
     event_ids TEXT NOT NULL,
     UNIQUE(as_id, txn_id) ON CONFLICT ROLLBACK