NeonN
Neon2y ago
2 replies
sad-indigo

Laravel migrations are failing

Preface: Testing Vercel for Laravel deployments. Created a PostgreSQL database through Vercel UI.

Deployment of Laravel app is successful, a test endpoint without any DB connection works and responds as expected.

I have added php artisan migrate to composer.json's scripts section. It runs after deps are installed. The first SQL command (creating the first table) goes through, the second one fails with the following error:

SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block (Connection: pgsql, SQL: alter table "users" add primary key ("id"))


Local instance runs perfectly fine. Versions between local instance and Neon's instance is almost the same version.

Local version: Debian 15.5-1.pgdg120+1
Neon's version: Ubuntu 15.5-1.pgdg22.04+1

What am I missing here? Why are the transactions being aborted? I spent about half an hour googleing and reading results, yet to found relevant information.
Was this page helpful?