Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

christaiwo's avatar

SQLSTATE[HY000]: General error: 1 no such table: sessions (Connection: sqlite, SQL: select * from "sessions" where "id" =

Hello there, I'm working on a multi-tenancy application and just setting it up. I'm using stancl/tenancy following the guide on tenancyforlaravel.com. After setting it up, everything worked fine, but when I moved my 0001_01_01_000000_create_users_table.php migration into the database/migrations/tenant directory and reran the migration, I started getting the following error:

SQLSTATE[HY000]: General error: 1 no such table: sessions (Connection: sqlite, SQL: select * from "sessions" where "id" = UT0usydrpjccnj33pROSlAlp1sh2zDo9336MJWF2 limit 1)

This error occurs on the central domain. I've searched online to identify the cause but can't seem to find any guide on how to resolve it.

0 likes
2 replies
Tray2's avatar

You need to create the sessions table, or change the session driver from database to file in your env file.

kai.trenbath's avatar

By moving the users migration to the tenant directory in database/migrations, you've moved the session table to the tenant database.

You can run php artisan session:table to create another session table for the central database as well.

Please or to participate in this conversation.