# Run migrations in the release, not in a request

> php artisan migrate --force belongs in the release step. A Vue button must not be the thing that migrates production.

- URL: https://laravel-vuejs.space/laravel-migrate-on-deploy-vue
- Author: Anass Ez-zouaine (https://laravel-vuejs.space/author/anass-ez-zouaine)
- Published: 2026-10-11
- Topics: Laravel, VueJs, Setup

People searching “Laravel migrate on deploy” hit the site once so `AppServiceProvider` can run migrations. Run them in the release, before the new code serves traffic. The [deploy guide](https://laravel-vuejs.space/deploy-laravel-vue) lists this command.

> **TL;DR**
>
> -   php artisan migrate —force belongs in the release step.
> -   A Vue button must not be the thing that migrates production.
> -   Do not call `Artisan::call('migrate')` from a controller the Vue page can hit.
> -   Do not migrate from a queued job “so the request stays fast”.
>
> **Who it's for:** Laravel + Vue developers
>
> **Applies to:** Laravel 13 · Vue 3

## The fix

```shell
php artisan migrate --force
```

`--force` is required when `APP_ENV` is production. It answers yes. Read the migration before you ship it. A `down()` that drops a column is not a small mistake.

## What to avoid

> **Gotcha**
>
> Do not call `Artisan::call('migrate')` from a controller the Vue page can hit. Two deploys, or two curious browsers, should not race that. Do not migrate from a queued job “so the request stays fast”. The new code and the old schema would be live together until the job runs.

## FAQ

**Q: How do I run migrations in the release, not in a request?**

php artisan migrate --force belongs in the release step. A Vue button must not be the thing that migrates production.

**Q: What goes wrong with Laravel migrate on deploy?**

Many developers hit the site once so `AppServiceProvider` can run migrations. Do not call `Artisan::call('migrate')` from a controller the Vue page can hit.
