HomePhabricator
Diffusion Comm 6e570829c37c

[sql/keyserver] added multipleStatements to fix fatal error

Description

[sql/keyserver] added multipleStatements to fix fatal error

Summary: fixes fatal error from landing https://phab.comm.dev/D5494

Test Plan:
Ran yarn dev in keyserver and:

  1. Confirmed migration 7 ran by checking the logs for the following:
[NODEM] (node:90015) DB version: 6
[NODEM] (node:90015) migration 7 succeeded.
  1. Confirmed that the MySQL tables looks as expected by inspecting with the mysql CLI utility

Tested the above for three distinct scenarios:

  1. Somebody has a broken setup due to the issues introduced in the previous diff (ran broken migration 6)
  2. Somebody has never run any migration 6 and still has the columns
  3. Somebody has never run any migration 6 and DOESN'T have these columns

To test all of these scenarios, I ran the following queries to undo the migration:

ALTER TABLE users ADD COLUMN public_key char(116) DEFAULT NULL, MODIFY hash char(60) COLLATE utf8mb4_bin NOT NULL;
ALTER TABLE sessions ADD COLUMN public_key char(116) DEFAULT NULL;
UPDATE metadata SET data = 5 WHERE name = "db_version";

Reviewers: ginsu, tomek, derek

Reviewed By: ginsu

Subscribers: przemek, abosh, atul, tomek, ginsu, ashoat

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

Details

Provenance
derekAuthored on Nov 3 2022, 11:36 AM
ashoatCommitted on Nov 3 2022, 11:57 AM
Reviewer
ginsu
Differential Revision
D5521: [sql/keyserver] added multipleStatements to fix fatal error
Parents
rCOMMb3d927bea242: [Nix] Move to rustup supplied tooling
Branches
Unknown
Tags
Unknown