HomePhabricator
Diffusion Comm ea01f20da72d

[keyserver] add code to create `policy_acknowledgments` table on database setup

Description

[keyserver] add code to create policy_acknowledgments table on database setup

Summary:
Add the table to track user acknowledgments.

Table structure was described in ENG-1868.

There is a code duplication between this and https://phab.comm.dev/D5307 - looks like the idea of setup-db was to create an entire database with one query, but if it can be done differently I will extract this query to one function and run the same code in both migration and here.

Test Plan:

  1. Create locally new database (to avoid overriding local database with mock data) and gave permissions to comm@localhost
  2. Update db_config.json with new database name
  3. Run keyserver and check if database was created with policy_acknowledgments table.

Reviewers: atul, marcin, ashoat, tomek

Reviewed By: marcin, ashoat, tomek

Subscribers: ashoat, atul, abosh

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

Details