diff options
Diffstat (limited to 'sql/lite.sql')
-rw-r--r-- | sql/lite.sql | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/lite.sql b/sql/lite.sql index 1cc0c4dc5..44df0586d 100644 --- a/sql/lite.sql +++ b/sql/lite.sql @@ -97,7 +97,7 @@ CREATE TABLE archive ( created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ); -CREATE INDEX i_username ON archive(username); +CREATE INDEX i_username_timestamp ON archive(username, timestamp); CREATE INDEX i_timestamp ON archive(timestamp); CREATE INDEX i_peer ON archive(peer); CREATE INDEX i_bare_peer ON archive(bare_peer); @@ -375,3 +375,14 @@ CREATE TABLE proxy65 ( CREATE UNIQUE INDEX i_proxy65_sid ON proxy65 (sid); CREATE INDEX i_proxy65_jid ON proxy65 (jid_i); + +CREATE TABLE push_session ( + username text NOT NULL, + timestamp bigint NOT NULL, + service text NOT NULL, + node text NOT NULL, + xml text NOT NULL +); + +CREATE UNIQUE INDEX i_push_usn ON push_session (username, service, node); +CREATE UNIQUE INDEX i_push_ut ON push_session (username, timestamp); |