Skip to content

Commit 882f910

Browse files
dotMavriQclaude
andcommitted
fix: remove --isolated from migrate (cache_locks table doesn't exist on first run)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 25a2d11 commit 882f910

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

docker/entrypoint.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,13 @@ log "Database connection established"
8686

8787
# ---- Step 6: Run migrations ----
8888
log "Running database migrations..."
89-
if php artisan migrate --force --isolated 2>&1; then
89+
# Note: --isolated requires cache_locks table which may not exist on first run
90+
# Use --force only (safe since we're the only instance during startup)
91+
if php artisan migrate --force 2>&1; then
9092
log "Migrations completed successfully"
9193
else
9294
MIGRATE_EXIT=$?
93-
# Exit code 0 means success, non-zero could be a lock (--isolated)
94-
if [ "$MIGRATE_EXIT" -eq 0 ]; then
95-
log "Migrations completed (no changes needed)"
96-
else
97-
fatal "Migration failed with exit code $MIGRATE_EXIT"
98-
fi
95+
fatal "Migration failed with exit code $MIGRATE_EXIT"
9996
fi
10097

10198
# ---- Step 7: Cache configuration for production performance ----

0 commit comments

Comments
 (0)