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:
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.2 Replies
fascinating-indigoOP•2y ago
Resolved by adding a flag to Laravel's migration files to not use transactions and it resolved it 🤷♂️
xenial-black•15mo ago
What happen if there is migration errors? Will it rollback?