Skip to content

Commit

Permalink
tenant: Introduce tenant_id to every table (#64323)
Browse files Browse the repository at this point in the history
We introduce the tenant_id column to every table without any magic
enforcement or magic default value. Instead we default to NULL and plan
to have an out of band migration. From out testing this change is
instant since it is only a table metadata change. According to the
documentation this sort of ALTER TABLE is instant since Postgres 11.

Test Plan: ran this migration against a clone of the s2 database.

---------

Co-authored-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>
  • Loading branch information
eseliger and keegancsmith committed Aug 9, 2024
1 parent 7ad393b commit 43e06ce
Show file tree
Hide file tree
Showing 20 changed files with 6,659 additions and 351 deletions.
8 changes: 7 additions & 1 deletion dev/backcompat/flakes.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,11 @@
"reason": "We remove constraints and the old tests checked that we were failing"
}
],
"5.4.0": []
"5.4.0": [
{
"path": "internal/insights/store",
"prefix": "TestCreateDashboard",
"reason": "Updates all tables to have tenant_id and the old query for GetDashboardGrants used SELECT *"
}
]
}
Loading

0 comments on commit 43e06ce

Please sign in to comment.