HomePhabricator
Diffusion Comm 7893080409df

[native/sqlite] add missing unique and primary_key constraints to `sqlite_orm`…

Description

[native/sqlite] add missing unique and primary_key constraints to sqlite_orm structure

Summary: Add missing constraints to sqlite_orm storage which are present in sql creation code for olm_persist_account and olm_persist_sessions_table.

Test Plan:

  1. Use decoded SQLite (e.g. comment encryption code and re-install app)
  2. Instead of running migrations run SQLiteQueryExecutor::getStorage().sync_schema(); which will generate database.
  3. Connect do database using sqlite3 and call .schema;
  4. Check if constraints for mentioned table match previous one, created by migrations.

Reviewers: tomek, jon, atul, marcin, ashoat

Reviewed By: tomek, atul, marcin, ashoat

Subscribers: ashoat, atul, abosh

Differential Revision: https://phab.comm.dev/D5148