laravel-activitylog: Does not let me migrate my table it say's PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''")

These are the errors - Exception trace:

PDOException:😦"SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ‘’") C:\wamp64\www\fyp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:457

PDO::prepare(“create table `` (id bigint unsigned not null auto_increment primary key, log_name varchar(191) null, description text not null, subject_id bigint unsigned null, subject_type varchar(191) null, causer_id bigint unsigned null, causer_type varchar(191) null, properties text null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’”) C:\wamp64\www\fyp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:457

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 28

Most upvoted comments

You have to delete this line ACTIVITY_LOGGER_DB_CONNECTION=true - it uses your default connection by default.

thank you soo much guys it’s working it’s migrated

In this case your config isn’t named correctly or you develope with a cached config. If it’s the second: you should never cache the config or routes on your local machine during development.

php artisan config:clear

oh I’ve done that now I’m getting this error

1 array_key_exists([]) C:\wamp64\www\fyp\vendor\laravel\framework\src\Illuminate\Support\Arr.php:151

2 Illuminate\Support\Arr::exists([]) C:\wamp64\www\fyp\vendor\laravel\framework\src\Illuminate\Support\Arr.php:292

Please use the argument -v to see more details.

In this case your config isn’t named correctly or you develope with a cached config. If it’s the second: you should never cache the config or routes on your local machine during development.

php artisan config:clear