src/pEpEngine.c
branchENGINE-559
changeset 3829 e1d53d19bb4d
parent 3804 7535bfbf092c
parent 3806 b9c98a86b791
child 3880 1642cd731c9f
     1.1 --- a/src/pEpEngine.c	Wed May 29 19:33:45 2019 +0200
     1.2 +++ b/src/pEpEngine.c	Tue Jun 04 15:08:54 2019 +0200
     1.3 @@ -997,6 +997,7 @@
     1.4                  "   timestamp integer default (datetime('now')),\n"
     1.5                  "   primary key (address, user_id)\n"
     1.6                  ");\n"
     1.7 +                "create index if not exists identity_userid_addr on identity(address, user_id);\n"
     1.8                  "create table if not exists trust (\n"
     1.9                  "   user_id text not null\n"
    1.10                  "       references person (id)\n"
    1.11 @@ -1458,6 +1459,16 @@
    1.12              if (version < 12) {
    1.13                  int_result = sqlite3_exec(
    1.14                      _session->db,
    1.15 +                    "create index if not exists identity_userid_addr on identity(address, user_id);\n"
    1.16 +                    ,
    1.17 +                    NULL,
    1.18 +                    NULL,
    1.19 +                    NULL
    1.20 +                );
    1.21 +                assert(int_result == SQLITE_OK);
    1.22 +                
    1.23 +                int_result = sqlite3_exec(
    1.24 +                    _session->db,
    1.25                      "alter table identity\n"
    1.26                      "   add column pEp_version_major integer default 0;\n"
    1.27                      "alter table identity\n"