Queue backlog
Count waiting jobs by queue name.
select queue, count(*) as jobs
from jobs
group by queue
order by jobs desc, queue;A fresh Laravel 13 application ships with eight framework tables created by the default migrations: users, password_reset_tokens, sessions, cache, cache_locks, jobs, job_batches, and failed_jobs. This diagram shows the full default schema - the users table with password and remember_token columns, the sessions table with its user_id index, and the queue tables that track jobs and batches.
Written by Varun Krishnan · Founder, dbdiagramr
Published · Updated
Source: Laravel v13.11.0 default migrations (laravel/laravel) · License: MIT
Default migrations from laravel/laravel v13.11.0, released 2026-10-06.
Package tables such as Sanctum personal_access_tokens and optional Artisan-generated tables are not part of the framework defaults. default migrations.
Scroll horizontally to see the full diagram. Click it to open at full size.
Paste this HTML into a README, docs page, or blog post. The image links back to the full schema page.
<a href="https://www.dbdiagramr.space/schema/laravel">
<img src="https://www.dbdiagramr.space/schemas/laravel-er-diagram.svg" alt="Laravel Database Schema Diagram" width="2290" height="390" />
</a>
<p><a href="https://www.dbdiagramr.space/schema/laravel">Laravel Database Schema Diagram</a> by dbdiagramr</p>| Column | Type | Nullable | Key |
|---|---|---|---|
| users | |||
| id | bigint | No | PK |
| name | varchar | No | - |
| varchar | No | - | |
| email_verified_at | timestamp | Yes | - |
| password | varchar | No | - |
| remember_token | varchar(100) | Yes | - |
| created_at | timestamp | Yes | - |
| updated_at | timestamp | Yes | - |
| password_reset_tokens | |||
| varchar | No | PK | |
| token | varchar | No | - |
| created_at | timestamp | Yes | - |
| sessions | |||
| id | varchar | No | PK |
| user_id | bigint | Yes | - |
| ip_address | varchar(45) | Yes | - |
| user_agent | text | Yes | - |
| payload | text | No | - |
| last_activity | integer | No | - |
| jobs | |||
| id | bigint | No | PK |
| queue | varchar | No | - |
| payload | text | No | - |
| attempts | smallint | No | - |
| reserved_at | integer | Yes | - |
| available_at | integer | No | - |
| created_at | integer | No | - |
| job_batches | |||
| id | varchar | No | PK |
| name | varchar | No | - |
| total_jobs | integer | No | - |
| pending_jobs | integer | No | - |
| failed_jobs | integer | No | - |
| failed_job_ids | text | No | - |
| options | text | Yes | - |
| cancelled_at | integer | Yes | - |
| created_at | integer | No | - |
| finished_at | integer | Yes | - |
| failed_jobs | |||
| id | bigint | No | PK |
| uuid | varchar | No | - |
| connection | varchar | No | - |
| queue | varchar | No | - |
| payload | text | No | - |
| exception | text | No | - |
| failed_at | timestamp | No | - |
| cache | |||
| key | varchar | No | PK |
| value | text | No | - |
| expiration | bigint | No | - |
| cache_locks | |||
| key | varchar | No | PK |
| owner | varchar | No | - |
| expiration | bigint | No | - |
These PostgreSQL queries run against the schema shown on this page.
Count waiting jobs by queue name.
select queue, count(*) as jobs
from jobs
group by queue
order by jobs desc, queue;List failed jobs newest first.
select id, connection, queue, failed_at
from failed_jobs
order by failed_at desc;Count database sessions for each user.
select u.email, count(s.id) as sessions
from users u
left join sessions s on s.user_id = u.id
group by u.id, u.email
order by sessions desc, u.email;Inspect stored cache keys and expiry timestamps.
select key, expiration
from cache
order by expiration, key;The default migrations are split by purpose. The first file creates authentication and session storage; the second creates the cache; the third creates queue tracking.
| Table | Purpose |
|---|---|
users | Application accounts: name, unique email, password hash, verification timestamp, and remember token. |
password_reset_tokens | One row per email address requesting a reset, keyed by email, with the hashed token and creation time. |
sessions | Server-side session payloads keyed by a string session id, with an indexed user_id, IP address, user agent, and last activity time. |
cache / cache_locks | Database cache values and locks, keyed by cache key, with expiration timestamps. |
jobs | Queued jobs waiting to run, with queue name, payload, attempts, reservation time, and availability time. |
job_batches | Batch metadata: total, pending, and failed counts, failed job ids, options, cancellation, creation, and finish times. |
failed_jobs | Jobs that exhausted their attempts, with connection, queue, payload, exception, and failure time. |
The sessions.user_id column is indexed but is not declared as a foreign key in the default migration. That keeps the session table usable when users are deleted or when the session driver runs without a users table.
Only the eight tables above come from a fresh laravel/laravel install. Other common tables arrive with packages or optional Artisan commands:
personal_access_tokens comes from Laravel Sanctum, not the framework skeleton.password_resets is the old pre-Laravel 8 name. Current applications use password_reset_tokens.batches; the current default migration creates job_batches.The source for this page is the Laravel 13 default migrations.
Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.
Try it free →