Skip to content
ุงู„ู…ุดุงุฑูŠุน

ุญูˆู„

๐Ÿ’จ Provides a good starting point for production-ready SQLite databases

ุงู„ุจูŠุงู†ุงุช ูˆุงู„ุชุญู„ูŠู„ุงุช

ูƒูŠู ุชูู‚ุงุณ ู‡ุฐู‡ ุงู„ุฃุฑู‚ุงู…

ุงู„ู†ู…ูˆ ุงู„ู…ู‚ุงุณ ู„ู„ู†ุฌูˆู…

ุฎู„ุงู„ 24 ุณุงุนุฉ
ู 
ุฎู„ุงู„ 7 ุฃูŠุงู…
ู 
ุฎู„ุงู„ 15 ูŠูˆู…ู‹ุง
ุœ-ูก
ุฎู„ุงู„ ุดู‡ุฑ
ุฌุงุฑู ุฌู…ุน ุงู„ุณุฌู„

ุชุบูŠู‘ุฑ ุตุงููŠ ุงู„ู†ุฌูˆู… ุฎู„ุงู„ ูุชุฑุงุช ู…ุชุฏุงุฎู„ุฉุŒ ูˆู„ูŠุณ ู…ุฌู…ูˆุนู‹ุง ูŠูˆู…ูŠู‹ุง. ุชุจู‚ู‰ ุงู„ู‚ูŠุงุณุงุช ุงู„ู…ูู‚ูˆุฏุฉ ูุงุฑุบุฉ. ุงู„ู†ุฌูˆู… ุชู‚ูŠุณ ุงู„ุงู‡ุชู…ุงู… ู„ุง ุฌูˆุฏุฉ ุงู„ุจุฑู…ุฌูŠุงุช.

Skeleton Php

GitHub Workflow Status (main) Total Downloads Latest Version License YouTube Channel Subscribers


This package is a work-in-progress, therefore you should not use it in production - and always backup your database before requiring it through Composer.

This package provides a simple way to optimize your SQLite database in Laravel; it's a good starting point for production-ready SQLite databases. At the time of this writing, it applies the following settings:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Setting                   โ”‚ Value       โ”‚ Via       โ”‚
 โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
 โ”‚ PRAGMA auto_vacuum        โ”‚ incremental โ”‚ Migration โ”‚
 โ”‚ PRAGMA journal_mode       โ”‚ WAL         โ”‚ Migration โ”‚
 โ”‚ PRAGMA page_size          โ”‚ 32768       โ”‚ Migration โ”‚
 โ”‚ PRAGMA busy_timeout       โ”‚ 5000        โ”‚ Runtime   โ”‚
 โ”‚ PRAGMA cache_size         โ”‚ -20000      โ”‚ Runtime   โ”‚
 โ”‚ PRAGMA foreign_keys       โ”‚ ON          โ”‚ Runtime   โ”‚
 โ”‚ PRAGMA incremental_vacuum โ”‚ (enabled)   โ”‚ Runtime   โ”‚
 โ”‚ PRAGMA mmap_size          โ”‚ 2147483648  โ”‚ Runtime   โ”‚
 โ”‚ PRAGMA temp_store         โ”‚ MEMORY      โ”‚ Runtime   โ”‚
 โ”‚ PRAGMA synchronous        โ”‚ NORMAL      โ”‚ Runtime   โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The settings are applied in two ways:

๐Ÿš€ Installation

Requires PHP 8.2+, SQLite 3.46+ and Laravel 11.0+

You can install the package via Composer:

composer require nunomaduro/laravel-optimize-database

๐Ÿ™Œ Usage

To get started optimizing your SQLite database, you need to run the following command:

php artisan db:optimize

At this point, the [Runtime] settings are applied automatically. However, you need to run the migration to apply the [Migration] settings:

php artisan migrate

Laravel Optimize Database was created by Nuno Maduro under the MIT license.

ุงุณุชูƒุดู ู…ุดุงุฑูŠุน ู…ุดุงุจู‡ุฉ ูˆู…ุฑุชุจุทุฉ

ุฌุงุฑู ุงู„ุชุญู…ูŠู„โ€ฆ