Page MenuHomePhabricator

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

Authored by kamil on Oct 6 2022, 3:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 11:51 PM
Unknown Object (File)
Wed, Jun 26, 12:24 PM
Unknown Object (File)
Wed, Jun 26, 12:24 PM
Unknown Object (File)
Wed, Jun 26, 12:24 PM
Unknown Object (File)
Wed, Jun 26, 12:24 PM
Unknown Object (File)
Wed, Jun 26, 12:22 PM
Unknown Object (File)
Fri, Jun 21, 7:31 AM
Unknown Object (File)
Mon, Jun 17, 2:56 AM

Details

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.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil edited the test plan for this revision. (Show Details)
kamil added a reviewer: atul.
kamil published this revision for review.Oct 6 2022, 4:50 AM
This revision is now accepted and ready to land.Oct 6 2022, 6:12 AM
marcin added a reviewer: tomek.
This revision now requires review to proceed.Oct 11 2022, 11:35 AM

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.

It is ok to keep it as it is - this is our current approach, which isn't ideal, bot works good enough.

The same comments which I gave in D5307 also apply here.

This revision is now accepted and ready to land.Oct 12 2022, 4:45 AM
kamil edited the test plan for this revision. (Show Details)

rebase