INSERT INTO api_key_rights (api_key_rights_id, name, description)
VALUES
    (gen_random_uuid(), 'management.read', 'Read management capabilities for a client'),
    (gen_random_uuid(), 'management.tables.write', 'Create or alter managed tables'),
    (gen_random_uuid(), 'management.tables.drop', 'Drop managed tables'),
    (gen_random_uuid(), 'management.columns.write', 'Alter managed columns'),
    (gen_random_uuid(), 'management.columns.drop', 'Drop managed columns'),
    (gen_random_uuid(), 'management.indexes.write', 'Create managed indexes'),
    (gen_random_uuid(), 'management.indexes.drop', 'Drop managed indexes'),
    (gen_random_uuid(), 'management.functions.read', 'List managed Postgres functions'),
    (gen_random_uuid(), 'management.functions.write', 'Create or replace managed Postgres functions'),
    (gen_random_uuid(), 'management.functions.drop', 'Drop managed Postgres functions'),
    (gen_random_uuid(), 'gateway.rpc.execute', 'Execute Postgres functions through Athena RPC routes'),
    (gen_random_uuid(), 'management.*', 'Wildcard management access for a client')
ON CONFLICT (name) DO UPDATE
SET description = EXCLUDED.description,
    updated_at = now();
