Migration isolation failing even with script saying version is higher
Steps To Reproduce
Enabling AUTORUN_LARAVEL_MIGRATION_ISOLATION on a laravel 11 on the latest image
Throws error
Outcome
What did you expect?
Migrations should run
What happened instead?
Migrations not running
Affected Docker Images
serversideup/php:8.4-fpm-nginx-alpine
Anything else?
No response
Looking into this now. If you're available for a quick response to this question, it will be very helpful.
I am able to replicate this but here's my question:
👉 Is this happening to you on first provision (where it's creating the database for the first time?)
I am seeing this error:
Illuminate\Database\QueryException
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cache_locks" does not exist
LINE 1: update "cache_locks" set "owner" = $1, "expiration" = $2 whe...
^ (Connection: pgsql, SQL: update "cache_locks" set "owner" = r10EHDELhgPuJVQj, "expiration" = 1764960310 where "key" = laravel-cache-framework/command-migrate and ("owner" = r10EHDELhgPuJVQj or "expiration" <= 1764956710))
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:824
820▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
821▕ );
822▕ }
823▕
➜ 824▕ throw new QueryException(
825▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
826▕ );
827▕ }
828▕ }
+18 vendor frames
If you want further output in your case
You can set AUTORUN_DEBUG=true to get more output why it's failing.
I believe this should be fixed in #628. You can test it by using this test image (once this build is done):
serversideup/php-dev:628-8.4-fpm-nginx-alpine
How I confirmed this fix
I used these variables:
AUTORUN_ENABLED: true
AUTORUN_LARAVEL_MIGRATION_ISOLATION: true
AUTORUN_DEBUG: true
My results
✅ It worked
Next Steps
Let me know if my test image solves your problem and I will get this merged 👍