Search code examples
phpmysqllaraveldatabaselaravel-11

Laravel 11 forces creation of tables you don't want and crashes the app


I'm trying to work with Laravel 11, and deleted all migrations and created my own migrations, even deleted the database from mysql (which is a waste, I could use the old data with the new app in Laravel 11), but is not working at at all. It gives the error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydatabase.sessions' doesn't exist

Why that table still exists and its being called from code, even if I didn't create?


Solution

  • Laravel expects to find a sessions table if you have configured it to store sessions in the database, as opposed to file, cookie, array etc.