You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/4.laravel/1.laravel-automations.md
+19-8Lines changed: 19 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,26 @@ layout: docs
13
13
In order for this script to run,`AUTORUN_ENABLED` must be set to `true`. Once the main part of the script is enabled, you can control the individual tasks by setting the corresponding environment variables to `true` or `false`. See our [variable reference document](/docs/reference/environment-variable-specification) for more details.
|`AUTORUN_LARAVEL_MIGRATION_ISOLATION`|`false`| Run your migrations with the [`--isolated`](https://laravel.com/docs/12.x/migrations#running-migrations) flag. <br> **ℹ️ Note:** Requires Laravel v9.38.0+ |
24
+
|`AUTORUN_LARAVEL_MIGRATION_TIMEOUT`|`30`| Number of seconds to wait for database connection before timing out during migrations. |
25
+
|`AUTORUN_LARAVEL_OPTIMIZE`|`true`|`php artisan optimize`: Optimizes the application. |
26
+
|`AUTORUN_LARAVEL_ROUTE_CACHE`|`true`|`php artisan route:cache`: Caches the routes. |
27
+
|`AUTORUN_LARAVEL_STORAGE_LINK`|`true`|`php artisan storage:link`: Creates a symbolic link from `public/storage` to `storage/app/public`. |
28
+
|`AUTORUN_LARAVEL_VIEW_CACHE`|`true`|`php artisan view:cache`: Caches the views. |
29
+
30
+
## Database Connection Checks
31
+
Before running migrations, the script performs database connection checks to ensure the database is ready. It will:
32
+
- Clear the Laravel configuration cache before attempting migrations
33
+
- Try to connect to the database for up to `AUTORUN_LARAVEL_MIGRATION_TIMEOUT` seconds (default: 30)
34
+
- Automatically detect and handle SQLite databases differently
35
+
- Show detailed connection attempts when `AUTORUN_DEBUG` is enabled
25
36
26
37
## php artisan storage:link
27
38
Creates a symbolic link from `public/storage` to `storage/app/public`.
0 commit comments