Download the PHP package eznix86/laravel-sqlite without Composer
On this page you can find all versions of the php package eznix86/laravel-sqlite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-sqlite
Optimize SQLite For Laravel
Optimize SQLite for Laravel in production.
This package exists to give SQLite-first Laravel apps explicit control over performance PRAGMAs, maintenance commands, and migration-time file behavior.
Features
- Multi SQLite Connection Support
- Configurable SQLite PRAGMAs
- Supports Litestream Package
- Handles migration command startup to prepare missing SQLite files/directories.
Requirements
- PHP
^8.3 - Laravel
13.x>= v2.0.0 - Laravel
12.x<= v2.0.0
Installation
Publish the config file:
Configuration
Configuration lives in config/sqlite.php.
Key options:
sqlite.enabled- enable/disable package PRAGMA application.sqlite.litestream- Litestream-safe mode (forceswal_autocheckpoint=0).sqlite.pragmas.incremental_vacuumsqlite.pragmas.temp_storesqlite.pragmas.cache_size_mbsqlite.pragmas.mmap_size_mbsqlite.pragmas.wal_autocheckpoint
Environment variable prefix: SQLITE_...
Commands
Vacuum
Run full VACUUM on SQLite connections:
Notes:
- Without
--connection, it runs on all configured SQLite connections. - If
sqlite.litestream=true, the command is blocked by design.
Show PRAGMAs
Display configuration and runtime PRAGMA values:
Manually Cache / Clear PRAGMA SQL
These are also connected to Laravel optimize commands:
php artisan optimize-> caches PRAGMA SQLphp artisan optimize:clear-> clears PRAGMA SQL cache
Migration Behavior
The package listens for commands and prepares SQLite file connections automatically:
- For
migrate*anddb:wipe: ensures database files/directories exist (except:memory:). - For
migrate:fresh: removes the SQLite file and sidecars (-wal,-shm,-journal) first, then recreates the database file. - If
--database=...is provided, only that SQLite connection is targeted.
Litestream Support
If you want to back up and replicate your SQLite database with Litestream.
Use eznix86/laravel-litestream:
- GitHub: https://github.com/eznix86/laravel-litestream
- Packagist: https://packagist.org/packages/eznix86/laravel-litestream
Development
Notes:
- This package currently uses feature-style tests; there is no dedicated
test:unitscript.
License
MIT