mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-22 14:14:42 -04:00
Support for database schema version ranges (#9933)
This is essentially an implementation of the proposal made at https://hackmd.io/@richvdh/BJYXQMQHO, though the details have ended up looking slightly different.
This commit is contained in:
parent
a14884fbb0
commit
c1b9922498
7 changed files with 207 additions and 78 deletions
|
@ -20,6 +20,13 @@ CREATE TABLE IF NOT EXISTS schema_version(
|
|||
CHECK (Lock='X')
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS schema_compat_version(
|
||||
Lock CHAR(1) NOT NULL DEFAULT 'X' UNIQUE, -- Makes sure this table only has one row.
|
||||
-- The SCHEMA_VERSION of the oldest synapse this database can be used with
|
||||
compat_version INTEGER NOT NULL,
|
||||
CHECK (Lock='X')
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS applied_schema_deltas(
|
||||
version INTEGER NOT NULL,
|
||||
file TEXT NOT NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue