> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Laravel Database Migration

Make sure you have a database connection with your Laravel Fly App. You can check out our various connection guides on [`MySQL`](/laravel/database-guides/laravel-mysql), [`Postgres`](/laravel/database-guides/laravel-pgsql), [`Redis`](/laravel/database-guides/laravel-redis), and [`SQLite`](/laravel/database-guides/laravel-sqlite).

Once you're set up with a database connection, there are several ways to run the Laravel classic: "`php artisan migrate`" command at Fly.io:

\#1 Through the `fly.toml` \[deploy] configuration ( which will run in every deployment )

```toml theme={null}
[deploy]
  release_command = "php /var/www/html/artisan migrate --force"
```

\#2 Through a [Start Script](/laravel/the-basics/customizing-deployments#startup-scripts) in `.fly/scripts`:

```bash theme={null}
echo "/usr/bin/php /var/www/html/artisan migrate --force" > ".fly/scripts/db.sh"
```

\#3 Through `fly ssh console` shortcut:

```bash theme={null}
fly ssh console -C "php /var/www/html/artisan migrate --force"
```

\#4 Through `fly ssh console`:

```bash theme={null}
fly ssh console
cd /var/www/html/
php artisan migrate --force
```
