ENGINE-289: added alternate user id mapping tables ENGINE-289
authorKrista Bennett <krista@pep-project.org>
Wed, 17 Jan 2018 00:09:58 +0100
branchENGINE-289
changeset 2396f9015ee2527c
parent 2395 2b7294a57041
child 2397 ee6f72ef704b
ENGINE-289: added alternate user id mapping tables
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Tue Jan 16 23:31:06 2018 +0100
     1.2 +++ b/src/pEpEngine.c	Wed Jan 17 00:09:58 2018 +0100
     1.3 @@ -529,6 +529,12 @@
     1.4                  "       on delete cascade,\n"
     1.5                  "   revocation_date integer\n"
     1.6                  ");\n"
     1.7 +                // user id aliases
     1.8 +                "create table if not exists alternate_user_id (\n"
     1.9 +                "    default_id text references person (id)\n"
    1.10 +                "       on delete cascade on update cascade,\n"
    1.11 +                "    alternate_id text primary key\n"
    1.12 +                ");\n"
    1.13                  ,
    1.14              NULL,
    1.15              NULL,
    1.16 @@ -729,7 +735,13 @@
    1.17                      "DROP TABLE _trust_old;\n"
    1.18                      "COMMIT;\n"
    1.19                      "\n"
    1.20 -                    "PRAGMA foreign_keys=on;\n",
    1.21 +                    "PRAGMA foreign_keys=on;\n"
    1.22 +                    "create table if not exists alternate_user_id (\n"
    1.23 +                    "    default_id text references person (id)\n"
    1.24 +                    "       on delete cascade on update cascade,\n"
    1.25 +                    "    alternate_id text primary key\n"
    1.26 +                    ");\n"
    1.27 +                    ,
    1.28                      NULL,
    1.29                      NULL,
    1.30                      NULL