Skip to main content

upgrade_data_lake_schema_v9

Function upgrade_data_lake_schema_v9 

Source
pub async fn upgrade_data_lake_schema_v9(
    tr: &mut Transaction<'_, Postgres>,
) -> Result<(), Error>
Expand description

Upgrades the data lake schema to version 9.

Seeds ('public', 'read', '*') and ('public', 'mint', '*') into audience_grants. The read row replaces the built-in PUBLIC_AUDIENCE arm removed from AudienceReadPolicy::resolve; the mint row is what lets a non-admin mint a key bound to public without an operator having to discover and create the row by hand. ON CONFLICT DO NOTHING because an operator may already have created either row before upgrading – this must not fail the migration.