Skip to content

Fix: Add missing expires_at column to personal_access_tokens migration#11

Open
JoshuaRaiser wants to merge 1 commit intoiqonic-design:backendfrom
JoshuaRaiser:patch-1
Open

Fix: Add missing expires_at column to personal_access_tokens migration#11
JoshuaRaiser wants to merge 1 commit intoiqonic-design:backendfrom
JoshuaRaiser:patch-1

Conversation

@JoshuaRaiser
Copy link
Copy Markdown

Description

This PR fixes a critical bug in the personal_access_tokens migration by adding the missing expires_at column.

Problem

The current migration is missing the expires_at column, which causes the following error when creating tokens:

SQLSTATE[42703]: Undefined column: 7 ERROR: column "expires_at" of relation "personal_access_tokens" does not exist

Solution

Added the expires_at timestamp column to the personal_access_tokens table migration. This column is required by newer versions of Laravel Sanctum to support token expiration functionality.

Changes

  • Added $table->timestamp('expires_at')->nullable(); to the migration file

Testing

  • Tested token creation after migration
  • Verified no errors occur when generating authentication tokens
  • Confirmed backward compatibility with existing tokens

Related Issue

Fixes authentication token creation error in PostgreSQL databases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant