-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: backward incompatible database schemas. It only preserves Proteu…
…s compatibility when migrating from CC 0.11.0 -> 1.0.0. For anything MLS-related it is recommended to wipe all the groups
- Loading branch information
Showing
11 changed files
with
73 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 12 additions & 50 deletions
62
keystore/src/connection/platform/generic/migrations/V1__schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,26 @@ | ||
CREATE TABLE mls_credentials ( | ||
id BLOB, | ||
credential BLOB | ||
); | ||
|
||
CREATE TABLE mls_signature_keypairs ( | ||
signature_scheme INT, | ||
keypair BLOB, | ||
pk BLOB, | ||
credential_id BLOB | ||
); | ||
|
||
CREATE TABLE mls_hpke_private_keys ( | ||
pk BLOB, | ||
sk BLOB | ||
); | ||
|
||
CREATE TABLE mls_encryption_keypairs ( | ||
pk BLOB, | ||
sk BLOB | ||
); | ||
|
||
CREATE TABLE mls_psk_bundles ( | ||
psk_id BLOB, | ||
psk BLOB | ||
CREATE TABLE mls_keys ( | ||
id VARCHAR(255) UNIQUE, | ||
key BLOB | ||
); | ||
|
||
CREATE TABLE mls_keypackages ( | ||
keypackage_ref BLOB, | ||
keypackage BLOB | ||
CREATE TABLE mls_identities ( | ||
id VARCHAR(255) UNIQUE, | ||
signature BLOB, | ||
credential BLOB | ||
); | ||
|
||
CREATE TABLE mls_groups ( | ||
id BLOB, | ||
state BLOB, | ||
parent_id BLOB | ||
); | ||
|
||
CREATE TABLE mls_pending_groups ( | ||
id BLOB, | ||
state BLOB, | ||
cfg BLOB, | ||
parent_id BLOB | ||
state BLOB | ||
); | ||
|
||
CREATE TABLE proteus_prekeys ( | ||
id INT UNIQUE, | ||
key BLOB | ||
); | ||
|
||
CREATE TABLE proteus_identities ( | ||
pk BLOB, | ||
sk BLOB | ||
); | ||
|
||
CREATE TABLE proteus_sessions ( | ||
id VARCHAR(255) UNIQUE, | ||
session BLOB | ||
); | ||
|
||
CREATE TABLE e2ei_enrollment ( | ||
id VARCHAR(255) UNIQUE, | ||
content BLOB | ||
CREATE TABLE mls_pending_groups ( | ||
id BLOB, | ||
state BLOB, | ||
cfg BLOB | ||
); |
9 changes: 9 additions & 0 deletions
9
keystore/src/connection/platform/generic/migrations/V2__proteus.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CREATE TABLE proteus_identities ( | ||
sk BLOB, | ||
pk BLOB | ||
); | ||
|
||
CREATE TABLE proteus_sessions ( | ||
id VARCHAR(255) UNIQUE, | ||
session BLOB | ||
); |
2 changes: 2 additions & 0 deletions
2
keystore/src/connection/platform/generic/migrations/V3__parentgroups.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE mls_groups ADD COLUMN parent_id BLOB; | ||
ALTER TABLE mls_pending_groups ADD COLUMN parent_id BLOB; |
4 changes: 4 additions & 0 deletions
4
keystore/src/connection/platform/generic/migrations/V4__e2ei.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CREATE TABLE e2ei_enrollment ( | ||
id VARCHAR(255) UNIQUE, | ||
content BLOB | ||
); |
35 changes: 35 additions & 0 deletions
35
keystore/src/connection/platform/generic/migrations/V5__mls_draft_20.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
-- Both those table are used only in MLS and we do not need to maintain backward compatibility there | ||
DROP TABLE mls_keys; | ||
DROP TABLE mls_identities; | ||
|
||
CREATE TABLE mls_signature_keypairs ( | ||
signature_scheme INT, | ||
keypair BLOB, | ||
pk BLOB, | ||
credential_id BLOB | ||
); | ||
|
||
CREATE TABLE mls_credentials ( | ||
id BLOB, | ||
credential BLOB | ||
); | ||
|
||
CREATE TABLE mls_hpke_private_keys ( | ||
pk BLOB, | ||
sk BLOB | ||
); | ||
|
||
CREATE TABLE mls_encryption_keypairs ( | ||
pk BLOB, | ||
sk BLOB | ||
); | ||
|
||
CREATE TABLE mls_psk_bundles ( | ||
psk_id BLOB, | ||
psk BLOB | ||
); | ||
|
||
CREATE TABLE mls_keypackages ( | ||
keypackage_ref BLOB, | ||
keypackage BLOB | ||
); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.