# independent-analytics/2.7.2/IAWP/Migrations/Migration_34.php

Independent Analytics – WordPress Analytics Plugin, version 2.7.2. 29 lines.

- Page: https://pluginprobe.com/plugins/independent-analytics/2.7.2/code/IAWP/Migrations/Migration_34.php
- Raw: https://pluginprobe.com/plugins/independent-analytics/2.7.2/raw/IAWP/Migrations/Migration_34.php
- Modified: 2024-07-29T15:34:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/independent-analytics/2.7.2/code/IAWP/Migrations/Migration_34.php#L10-L20`.

```php
<?php

namespace IAWP\Migrations;

use IAWP\Query;
/** @internal */
class Migration_34 extends \IAWP\Migrations\Step_Migration
{
    /**
     * @return int
     */
    protected function database_version() : int
    {
        return 34;
    }
    /**
     * @return array
     */
    protected function queries() : array
    {
        return [$this->add_index_for_cached_author_id()];
    }
    private function add_index_for_cached_author_id() : string
    {
        $resources_table = Query::get_table_name(Query::RESOURCES);
        return "\n            ALTER TABLE {$resources_table}\n                ADD INDEX(cached_author_id);\n        ";
    }
}

```
