Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDOException: SQLSTATE[HY000]: General error: 1 no such column: route #55

Closed
sebestenyb opened this issue May 29, 2016 · 1 comment
Closed

Comments

@sebestenyb
Copy link

Hi

I'm trying to use the package in a blank Laravel project.
It fails in the unit tests with the following error:

1) ExampleTest::testBasicExample
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such column: route (SQL: CREATE TEMPORARY TABLE __temp__logs AS SELECT id, user_id, owner_type, owner_id, old_value, new_value, type, created_at, updated_at, route FROM logs)

I'm using:

    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "owen-it/laravel-auditing": "^2.3",
        "doctrine/dbal": "^2.5"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*"
    },

The database used in the unit tests is an in-memory sqlite table.
The issue can be worked around by removing the following lines:

        Schema::table('logs', function (Blueprint $table) {
            $table->dropColumn('route');
            $table->dropColumn('ip');
        });
@anteriovieira
Copy link
Member

Set audit console for true, I wonder if it helped.

audit_console' => true,

https://github.com/owen-it/laravel-auditing/blob/master/config/auditing.php#L57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants