When updating https://github.com/mozilla-services/syncserver to the latest version using a sqlite3 backend, the tokenserver stopped working.
The logs say:
OperationalError: (sqlite3.OperationalError) no such column: keys_changed_at
[SQL: select
uid, generation, client_state, created_at, replaced_at,
keys_changed_at, node
from
users
where
email = ?
and
service = ?
order by
created_at desc, uid desc
limit
20
This stopped working (for the sqlite3 backend) with:
commit 9be195f2a75abf848bbdb1d271031a5632a0184c
Author: jrconlin <jr+git@mozilla.com>
Date: Fri Jan 3 15:32:57 2020 -0800
bug: Bring staticnode up-to-date with tokenserver storage
which extended the user table by two columns:
diff --git a/syncserver/staticnode.py b/syncserver/staticnode.py
index 9c73f65..3f58bdf 100644
--- a/syncserver/staticnode.py
+++ b/syncserver/staticnode.py
@@ -41,13 +41,16 @@ users = Table(
Column("client_state", String(32), nullable=False),
Column("created_at", BigInteger(), nullable=False),
Column("replaced_at", BigInteger(), nullable=True),
+ Column("keys_changed_at", BigInteger(), nullable=True),
+ Column("node", String(255), nullable=True),
Index('lookup_idx', 'email', 'service', 'created_at'),
)
but my existing sqlite3 database was not updated automatically, and I don't even see a script for updating it.