bedezign / yii2-audit

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
https://bedezign.github.io/yii2-audit/
Other
193 stars 112 forks source link

Exception with message "The table does not exist" #257

Closed neoacevedo closed 5 years ago

neoacevedo commented 5 years ago

Hi. It happens if I do a migration down or redo:

...
Migrated down successfully.
Exception 'yii\base\InvalidConfigException' with message 'The table does not exist: {{%audit_entry}}'
...

In console/config/main.php, in controllerMap section I configured the migration at this mode:

...
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => [
                '@app/migrations',
                '@yii/rbac/migrations',
                '@bedezign/yii2/audit/migrations',
                ...
            ],
        ],
...
Blizzke commented 5 years ago

Don't know if this is still an issue so closing for now. Please be advised that you should be using the namespace functionality from now on.

thtmorais commented 3 years ago

This error persists when you revert all migrations in your app and your console config has rules for yii2-audit.

For solved it you can add this in your console config:

'audit' => [
            'class' => 'bedezign\yii2\audit\Audit',
            'accessRoles' => ['administrator'],
            'ignoreActions' => ['migrate/*'],
            'compressData' => true
],