Sync FxA DB mirror schemas with upstream migrations (patches 145-192)#9339
Sync FxA DB mirror schemas with upstream migrations (patches 145-192)#9339clouserw wants to merge 1 commit into
Conversation
|
This is essentially the next iteration of #4605 . @akkomar @sean-rose Thank you |
akkomar
left a comment
There was a problem hiding this comment.
We can't dry-run external queries, but I tried testing them with limit 1 - some of them fail because of missing permissions.
We'd need to grant these in prod and stage:
-- new tables (column-list grants)
GRANT SELECT (domain, createdAt) ON `domainBlocklist` TO 'bigquery_ro';
GRANT SELECT (regex, createdAt) ON `emailBlocklist` TO 'bigquery_ro';
GRANT SELECT (
uid, credentialId, signCount, transports, aaguid, name,
createdAt, lastUsedAt, backupEligible, backupState, prfEnabled
) ON `passkeys` TO 'bigquery_ro';
-- new columns on existing column-granted tables
GRANT SELECT (verificationMethod) ON `accountResetTokens` TO 'bigquery_ro';
GRANT SELECT (verificationMethod) ON `passwordForgotTokens` TO 'bigquery_ro';
@clouserw this might require following process from https://mozilla-hub.atlassian.net/browse/SVCSE-2521?focusedCommentId=1015649.
|
Thanks for testing. I've filed SREIN-1291 to grant the extra permissions. |
Update BigQuery external table definitions for the FxA database mirrors (both prod and nonprod/stage) to reflect schema changes from FxA DB migrations 145 through 192 (Nov 2023 - May 2026). Modified tables: - carts: add currency, stripeSubscriptionId, stripeIntentId, isFreeTrial - securityEvents: add additionalInfo (JSON) - accountResetTokens: add verificationMethod - passwordForgotTokens: add verificationMethod New tables: - deletedAccounts: tracks deleted account UIDs and timestamps - passkeys: WebAuthn/FIDO2 credential metadata - emailBlocklist: regex-based email blocking rules - domainBlocklist: domain-based blocking rules No changes needed for fxa_oauth or fxa_profile databases (no migrations since before Nov 2023). Credential columns (clientSalt, verifyHashVersion2, wrapWrapKbVersion2, publicKey) intentionally excluded from mirror.
5fe9bc2 to
69efc15
Compare
|
We can't add permissions until after the table exists, so, I've removed the |
Description
Update BigQuery external table definitions for the FxA database mirrors (both prod and stage) to reflect schema changes from FxA DB migrations 145 through 192 (Nov 2023 - May 2026). I don't know of a way to test this.. Thanks
Reviewer, please follow this checklist