Releases: orangehill/iseed
Releases · orangehill/iseed
Laravel 13.x Compatibility
v3.7.2 - PHP 8.4 Compatibility Fix
Bug Fix
- Use explicit nullable types (
?Filesystem,?Composer) inIseedconstructor to resolve PHP 8.4 deprecation warning (#231)
Thanks to @dragonfly4 for reporting!
v3.7.1 - Documentation updates
Documentation
- Remove broken Travis CI badge (travis-ci.org shut down)
- Remove deprecated Google Analytics badge
- Update badges to
.svgformat for live updates - Add License badge
- Update README examples to match actual generated output:
- Add
namespace Database\Seeders - Add
use Illuminate\Database\Seeder - Change
truncate()todelete()to match actual code
- Add
- Update all path references from
database/seedstodatabase/seeders(Laravel 8+)
v3.7.0 - Whitespace preservation and PostgreSQL sequence reset
Features
- Add
--reset-sequencesoption for PostgreSQL (#160): Resets PostgreSQL sequences after seeding to prevent "duplicate key value violates unique constraint" errors when inserting new records.
php artisan iseed users --reset-sequencesBug Fixes
- Fix whitespace trimming in multiline strings (#191): The
prettifyArray()function now preserves whitespace inside multiline string values, fixing issues with YAML, JSON, or other data where indentation is significant.
Contributors
Thanks to @Magentron for reporting the whitespace issue and @cjlaborde for reporting the PostgreSQL sequence issue.
v3.6.0 - Skip option for pagination
New Feature
--skipoption: Skip a specified number of rows before exporting. Useful for paginating through large datasets.
Usage
# Export first 1000 rows
php artisan iseed users --max=1000 --orderby=id
# Export next 1000 rows (skip first 1000)
php artisan iseed users --max=1000 --skip=1000 --orderby=id
# Export rows 2001-3000
php artisan iseed users --max=1000 --skip=2000 --orderby=idBug Fix
- Fixed default direction to
ASCwhen using--orderbywithout explicit--direction
Thanks
Thanks to @whoisryosuke for PR #143.
v3.5.0 - Foreign key checks option
New Feature
--skip-fk-checksoption: Disable foreign key checks during seeding. Useful for tables with FK constraints that would fail on delete/insert operations.
Usage
php artisan iseed users --skip-fk-checksThis generates:
\DB::statement('SET FOREIGN_KEY_CHECKS=0;');
\DB::table('users')->delete();
\DB::table('users')->insert(...);
\DB::statement('SET FOREIGN_KEY_CHECKS=1;');Note: This generates MySQL-specific statements.
Thanks
v3.4.0 - Database connection in seeders
Fix
- Database connection in seeders: When using
--databasewith a non-default connection, the generated seeder now properly usesDB::connection('name')->table()instead of justDB::table(). This prevents accidental data operations on the wrong database.
Example
# Default database - generates: \DB::table('users')
php artisan iseed users
# Non-default database - generates: \DB::connection('mysql2')->table('users')
php artisan iseed users --database=mysql2Thanks
v3.3.0 - Custom stub templates
New Feature
- Custom stub templates: Specify a custom stub path via
config/iseed.phpto customize the generated seed file format.
Usage
Create config/iseed.php in your Laravel application:
<?php
return [
'stub_path' => resource_path('stubs'),
];Then create your custom stub at resources/stubs/seed.stub.
Thanks
Thanks to @bahri-hirfanoglu for PR #222.
v3.2.0 - Add --noregister option
New Feature
--noregisteroption: Generate seed files without adding them toDatabaseSeeder.php. Useful for creating backup seeders or manually managing which seeders are registered.
Usage
php artisan iseed users --noregisterThanks
Thanks to @VukTodorovic for the original PR #230 (renamed from --noseed to --noregister for clearer semantics).
Code quality improvements
What's Changed
Small fixes and code quality improvements.
Changes
- Use
config()helper instead of\Configfacade (#254) - @ChrisToxz - Fix typos in code and documentation (#242) - @szepeviktor
- Fix docblocks and return type annotations (#244, #245) - @szepeviktor
- Fix void return in
handle()method (#243) - @szepeviktor - Fix README.md documentation (#229) - @VukTodorovic
Full Changelog: v3.1.2...v3.1.3