Skip to content
Proyek

nunomaduro/laravel-optimize-database

Lihat di GitHub

Tentang

πŸ’¨ Provides a good starting point for production-ready SQLite databases

Data

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
-1
dalam 15 hari
-1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

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.

Jelajahi proyek terkait

Memuat…