Download the PHP package pittacusw/database without Composer
On this page you can find all versions of the php package pittacusw/database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package database
pittacusw/database
pittacusw/database is a Laravel package for:
- generating seeders from existing table data
- exporting each MySQL table to a gzipped SQL dump
- restoring SQL dump files back into a MySQL database
The package is intended for Laravel applications and targets Laravel 9.x through 13.x.
Requirements
- PHP
^8.0.2 - Laravel
^9.26|^10.0|^11.0|^12.0|^13.0 - MySQL client binaries available on the host machine for
db:backupanddb:restoremysqldumpmysql
Installation
Laravel package discovery will register the service provider and the Iseed facade automatically.
Commands
php artisan iseed
Generate seeders from one or more tables.
Important options:
--force: overwrite existing seed files without confirmation--clean: clear the managed#iseedsection insidedatabase/seeders/DatabaseSeeder.php--database=: choose a Laravel database connection--max=: limit exported rows--chunksize=: split inserts into smaller batches--exclude=: omit comma-separated columns--noindex: remove numeric indexes from exported arrays--classnameprefix=and--classnamesuffix=: customize the generated seeder class name
Generated files are written to database/seeders.
php artisan db:iseed
Generate seeders for all tables except a small built-in ignore list:
migrationspassword_resetsfailed_jobsgithub_webhook_callsjobs
Examples:
php artisan db:backup
Create a gzipped SQL dump per table in database/sql by default.
Notes:
- this command is MySQL-only
- dumps are executed through
mysqldumpusing Symfony Process, not through a shell string - output files are created as
*.sql.gz - one file is generated per table
- dump output is streamed directly into gzip files, so large tables are not buffered fully in PHP memory
- the database password is passed through
MYSQL_PWDinstead of a--password=CLI argument - the command uses
--single-transaction,--quick,--skip-lock-tables, and--hex-blob --gzip-level=accepts values from0to9and defaults to6
php artisan db:restore
Restore .sql and .sql.gz files from database/sql by default.
Notes:
- this command is MySQL-only
- files are restored in filename order
- SQL input is wrapped with
SET FOREIGN_KEY_CHECKS=0/1for safer restores .sqland.sql.gzfiles are streamed intomysql, so restore does not fully decompress a backup into memory first--chunk-size=controls the per-read streaming size and defaults to1048576bytes
DatabaseSeeder markers
If you want iseed to manage a dedicated section inside DatabaseSeeder, add markers like this:
When the markers are present, generated seeders are inserted between them. Otherwise the package appends the seeder call inside run().
Compatibility notes
- The package assumes Laravel's standard
database/seederspath. - Seeder generation works through Laravel's database connection layer.
- Backup and restore commands require a MySQL connection configured in
config/database.php. - On Windows and Linux, the MySQL client binaries only need to be available on
PATH, or you can pass explicit paths with--mysqldump-binaryand--mysql-binary.