summary refs log tree commit diff
path: root/synapse/storage/transactions.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-17 17:31:48 +0100
committerMark Haines <mark.haines@matrix.org>2014-10-17 17:31:48 +0100
commit82c582076782f180c9f69a523953c3a36b57b3ac (patch)
tree00a79bdfe56a139cbe427ecc28bad852bdc3663d /synapse/storage/transactions.py
parentSPEC-7: Rename 'ts' to 'origin_server_ts' (diff)
downloadsynapse-82c582076782f180c9f69a523953c3a36b57b3ac.tar.xz
keep 'origin_server_ts' as 'ts' in the database to avoid needlessly updating schema
Diffstat (limited to 'synapse/storage/transactions.py')
-rw-r--r--synapse/storage/transactions.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py
index a9fa959d49..2ba8e30efe 100644
--- a/synapse/storage/transactions.py
+++ b/synapse/storage/transactions.py
@@ -87,7 +87,8 @@ class TransactionStore(SQLBaseStore):
 
         txn.execute(query, (code, response_json, transaction_id, origin))
 
-    def prep_send_transaction(self, transaction_id, destination, origin_server_ts, pdu_list):
+    def prep_send_transaction(self, transaction_id, destination,
+                              origin_server_ts, pdu_list):
         """Persists an outgoing transaction and calculates the values for the
         previous transaction id list.
 
@@ -109,8 +110,8 @@ class TransactionStore(SQLBaseStore):
             transaction_id, destination, origin_server_ts, pdu_list
         )
 
-    def _prep_send_transaction(self, txn, transaction_id, destination, origin_server_ts,
-                               pdu_list):
+    def _prep_send_transaction(self, txn, transaction_id, destination,
+                               origin_server_ts, pdu_list):
 
         # First we find out what the prev_txs should be.
         # Since we know that we are only sending one transaction at a time,
@@ -131,7 +132,7 @@ class TransactionStore(SQLBaseStore):
             None,
             transaction_id=transaction_id,
             destination=destination,
-            origin_server_ts=origin_server_ts,
+            ts=origin_server_ts,
             response_code=0,
             response_json=None
         ))
@@ -251,7 +252,7 @@ class ReceivedTransactionsTable(Table):
     fields = [
         "transaction_id",
         "origin",
-        "origin_server_ts",
+        "ts",
         "response_code",
         "response_json",
         "has_been_referenced",
@@ -267,7 +268,7 @@ class SentTransactions(Table):
         "id",
         "transaction_id",
         "destination",
-        "origin_server_ts",
+        "ts",
         "response_code",
         "response_json",
     ]