Most queries we want to run on the database are based on the image "product" and "personality".
At the moment that implies joining the metrics_request_v2 and image_version tables, filtering by the result of a function you must write in the query, then joining that with the tables you want to actually query.
This branch makes it significantly easier by adding a machine/image mapping, and a couple of functions to get the image product and personality for a given request.
This will also be the base of the row-level security for the Endless deployment: a given user will only have access to the requests corresponding to machines running a given product/personality. (#46)
Most queries we want to run on the database are based on the image "product" and "personality".
At the moment that implies joining the metrics_request_v2 and image_version tables, filtering by the result of a function you must write in the query, then joining that with the tables you want to actually query.
This branch makes it significantly easier by adding a machine/image mapping, and a couple of functions to get the image product and personality for a given request.
This will also be the base of the row-level security for the Endless deployment: a given user will only have access to the requests corresponding to machines running a given product/personality. (#46)