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)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:20 PM
Unknown Object (File)
Tue, Nov 26, 5:07 PM
Unknown Object (File)
Tue, Nov 26, 5:06 PM

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
Branch
track-acknowledgments
Lint
No Lint Coverage
Unit
No Test Coverage

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