Skip to content

Commit 6c3da1b

Browse files
authored
docs: improves
1 parent 71c7e4f commit 6c3da1b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
------
1212

13-
> This package is a work-in-progress, and the goal is to keep improving the migration stub: [database/migrations/optimize_database_settings.php.stub](https://github.com/nunomaduro/laravel-optimize-database/blob/main/database/migrations/optimize_database_settings.php.stub).
13+
> This package is a work-in-progress, and the goal is to keep improving the migration stub: [database/migrations/optimize_database_settings.php.stub](https://github.com/nunomaduro/laravel-optimize-database/blob/main/database/migrations/optimize_database_settings.php.stub). At the moment, it only supports SQLite, but I am open to adding support for other database types.
1414
1515
This package publish a migration that will apply good defaults to your SQLite database, making it faster and more production-ready.
1616

@@ -35,12 +35,17 @@ php artisan db:optimize
3535
This will publish a migration that apply defaults like so:
3636

3737
```SQL
38-
PRAGMA journal_mode = WAL;
39-
PRAGMA synchronous = NORMAL;
40-
PRAGMA page_size = 32768;
41-
PRAGMA cache_size = -20000;
42-
PRAGMA auto_vacuum = incremental;
43-
// etc...
38+
public function up(): void
39+
{
40+
DB::statement('PRAGMA journal_mode = WAL');
41+
DB::statement('PRAGMA synchronous = NORMAL');
42+
DB::statement('PRAGMA page_size = 32768;');
43+
DB::statement('PRAGMA cache_size = -20000;');
44+
DB::statement('PRAGMA auto_vacuum = incremental;');
45+
46+
// etc...
47+
}
48+
};
4449
```
4550

4651
Next, you simply need to run the migration:

0 commit comments

Comments
 (0)