forked from paulfariello/aparte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc8c43c
commit f14df0a
Showing
2 changed files
with
48 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DROP TABLE omemo_identity; | ||
DROP TABLE omemo_session; | ||
DROP TABLE omemo_pre_key; | ||
DROP TABLE omemo_signed_pre_key; | ||
DROP TABLE omemo_sender_key; |
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,43 @@ | ||
CREATE TABLE omemo_identity ( | ||
identity_pk INTEGER PRIMARY KEY NOT NULL, | ||
account VARCHAR NOT NULL, | ||
user_id VARCHAR NOT NULL, | ||
device_id BIGINT NOT NULL, | ||
identity BLOB NOT NULL, | ||
UNIQUE(account, user_id, device_id) | ||
); | ||
|
||
CREATE TABLE omemo_session ( | ||
session_pk INTEGER PRIMARY KEY NOT NULL, | ||
account VARCHAR NOT NULL, | ||
user_id VARCHAR NOT NULL, | ||
device_id BIGINT NOT NULL, | ||
session BLOB NOT NULL, | ||
UNIQUE(account, user_id, device_id) | ||
); | ||
|
||
CREATE TABLE omemo_pre_key ( | ||
pre_key_pk INTEGER PRIMARY KEY NOT NULL, | ||
account VARCHAR NOT NULL, | ||
pre_key_id BIGINT NOT NULL, | ||
pre_key BLOB NOT NULL, | ||
UNIQUE(account, pre_key_id) | ||
); | ||
|
||
CREATE TABLE omemo_signed_pre_key ( | ||
signed_pre_key_pk INTEGER PRIMARY KEY NOT NULL, | ||
account VARCHAR NOT NULL, | ||
signed_pre_key_id BIGINT NOT NULL, | ||
signed_pre_key BLOB NOT NULL, | ||
UNIQUE(account, signed_pre_key_id) | ||
); | ||
|
||
CREATE TABLE omemo_sender_key ( | ||
sender_key_pk INTEGER PRIMARY KEY NOT NULL, | ||
account VARCHAR NOT NULL, | ||
sender_id VARCHAR NOT NULL, | ||
device_id BIGINT NOT NULL, | ||
distribution_id BLOB NOT NULL, | ||
sender_key BLOB NOT NULL, | ||
UNIQUE(account, sender_id, device_id, distribution_id) | ||
); |