async function addPermissionHelper(connection, config) {
    const existingPermission = await connection('permissions').where({
        name: config.name,
        action_type: config.action,
        object_type: config.object
    }).first();

    if (existingPermission) {
        logging.warn(`Permission for ${config.action}:${config.object} already added`);
        return;
    }

    logging.info(`Adding permission for ${config.action}:${config.object}`);

    const date = connection.raw('CURRENT_TIMESTAMP');

    await connection('permissions').insert({
        id: ObjectId().toHexString(),
        name: config.name,
        action_type: config.action,
        object_type: config.object,
        created_at: date,
        created_by: MIGRATION_USER,
        updated_at: date,
        updated_by: MIGRATION_USER
    });
}
@param {import('knex').Knex} connection
@param {PermissionConfig} config