HomePhabricator
Diffusion Comm d44d14f89a99

[native/sqlite] add missing indexes to `sqlite_orm` structure

Description

[native/sqlite] add missing indexes to sqlite_orm structure

Summary:
Add missing indexes to sqlite_orm storage which are created for messages table and media table.

Make_index() usage example: https://github.com/fnc12/sqlite_orm/blob/master/examples/index.cpp#L18

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 PRAGMA index_list(messages); and PRAGMA index_list(media);;
  4. Check if indexes 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/D5150

Details