A WhatsApp (Web) transport for XMPP.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
735B

  1. BEGIN;
  2. ALTER TABLE configuration ADD COLUMN allow_archiving BOOL NOT NULL DEFAULT false;
  3. ALTER TABLE configuration ADD COLUMN allow_history_fetches BOOL NOT NULL DEFAULT false;
  4. ALTER TABLE users ADD COLUMN enable_archiving BOOL NOT NULL DEFAULT false;
  5. CREATE TABLE administrators (
  6. id INTEGER PRIMARY KEY,
  7. jid VARCHAR UNIQUE NOT NULL
  8. );
  9. CREATE TABLE user_chat_history (
  10. id INTEGER PRIMARY KEY,
  11. user_id INT NOT NULL REFERENCES users,
  12. chat_id INT NOT NULL REFERENCES user_chats,
  13. user_from VARCHAR NOT NULL,
  14. ts_unix INT NOT NULL,
  15. xmpp_id VARCHAR NOT NULL,
  16. orig_id VARCHAR,
  17. body VARCHAR NOT NULL,
  18. oob_url VARCHAR
  19. );
  20. CREATE UNIQUE INDEX user_chat_history_unique ON user_chat_history (user_id, chat_id, xmpp_id);
  21. COMMIT;