← All posts
·6 min read
#laravel#database#tutorial

Laravel Default Database Tables Explained

Every table Laravel creates by default -- users, password_resets, failed_jobs, personal_access_tokens -- what each one does and what to change.

The short version

A fresh Laravel install creates 7-8 tables depending on your packages. The core ones are users, password_resets, failed_jobs, and personal_access_tokens. The cache, sessions, jobs, and batches tables are only created if you run the corresponding Artisan commands.

The core tables

users

ColumnTypeWhat it means
idbigint (PK)Auto-incrementing primary key.
namevarchar(255)User's display name.
emailvarchar(255)Unique email address.
email_verified_attimestampWhen email was verified. Null if unverified.
passwordvarchar(255)Hashed password (bcrypt). Never store plain text.
remember_tokenvarchar(100)Token for "remember me" functionality.

password_resets

ColumnTypeWhat it means
emailvarchar(255)The email requesting a reset.
tokenvarchar(255)The reset token (hashed).
created_attimestampWhen the token was generated.

failed_jobs

ColumnTypeWhat it means
idbigint (PK)Auto-incrementing ID.
uuidvarchar(255)Unique identifier for the job.
connectiontextQueue connection that failed.
queuevarcharWhich queue the job was on.
payloadlongTextThe job's serialized data.
exceptionlongTextThe full exception stack trace.

personal_access_tokens

Created by Laravel Sanctum for API token authentication.

ColumnTypeWhat it means
idbigint (PK)Auto-incrementing ID.
tokenable_typevarchar(255)The model this token belongs to.
tokenable_idbigintThe ID of that model.
namevarchar(255)Token name (e.g., "Mobile App").
tokenvarchar(60)The hashed token value.
abilitiestextJSON array of allowed abilities.

Optional tables

sessions -- created by php artisan session:table. cache -- created by php artisan cache:table. jobs -- created by php artisan queue:table. batches -- created by php artisan queue:batches-table. None are created by default.

FAQ

Does Laravel create all these tables automatically?
No. Only users, password_resets, and failed_jobs are created by php artisan migrate.

Can I use Redis instead of the database tables?
Yes. Switch your .env driver to redis for sessions, cache, and queues.

What's the difference between password_resets and password_reset_tokens?
Same table, different names. Laravel 8+ renamed it to password_reset_tokens.

Visualize your own database

Paste your PostgreSQL connection string and get an interactive ER diagram in under 10 seconds. No signup required.