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
Incorrect Table Name '' #122
Comments
Laravel 7 |
You have something misconfigured. The error is in your post above and is application specific. |
This isn't documented in the setup instructions (I don't think), but I was getting this error until I ran |
That’s your app. Not the package. That command is to clear your apps cached config and env file. |
Yes, you are correct. However your package installs config into the app per your package's instructions, and then the next instruction is to run the migration. If you simply follow those instructions without clearing the config cache in-between, then in my testing so far, this error always occurs. I'm not saying it's your fault or a problem with your package, I'm just indicating that it might be the fix the OP here needs. |
You choose to use caching which makes it an issue with your app. |
Yes, my app that I chose to use the core caching features of, and everyone else's app who uses the core caching features, would need to take this step into account while going through your instructions. I'm not sure what you're getting at with your responses. I was trying to provide assistance to the op since it didn't seem like his issue was resolved, so I shared what worked for me and what has been a required step for me when I use this package. It is your choice whether to call that out in the documentation, I certainly didn't request you to, but I'm calling it out here because it seems relevant to the OP's issue. Whoever's issue it is, the more people who can successfully use your package without error, the better, right? |
`Migrating: 2016_01_15_114412_create_role_user_table
Illuminate\Database\QueryException
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: alter table
roleUserTable
add constraintroleusertable_role_id_foreign
foreign key (role_id
) references `` (id
) on delete cascade)at C:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
1 C:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464
PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''")
2 C:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464
PDOStatement::execute()`
The text was updated successfully, but these errors were encountered: