Skip to content

Releases: orangehill/iseed

Laravel 13.x Compatibility

23 Feb 07:39

Choose a tag to compare

What's New

Full Changelog

v3.7.2...v3.8.0

v3.7.2 - PHP 8.4 Compatibility Fix

08 Feb 17:00

Choose a tag to compare

Bug Fix

  • Use explicit nullable types (?Filesystem, ?Composer) in Iseed constructor to resolve PHP 8.4 deprecation warning (#231)

Thanks to @dragonfly4 for reporting!

v3.7.1 - Documentation updates

28 Jan 12:44
b764a40

Choose a tag to compare

Documentation

  • Remove broken Travis CI badge (travis-ci.org shut down)
  • Remove deprecated Google Analytics badge
  • Update badges to .svg format 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() to delete() to match actual code
  • Update all path references from database/seeds to database/seeders (Laravel 8+)

v3.7.0 - Whitespace preservation and PostgreSQL sequence reset

28 Jan 12:26
5f8cdfb

Choose a tag to compare

Features

  • Add --reset-sequences option 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-sequences

Bug 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

28 Jan 08:53

Choose a tag to compare

New Feature

  • --skip option: 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=id

Bug Fix

  • Fixed default direction to ASC when using --orderby without explicit --direction

Thanks

Thanks to @whoisryosuke for PR #143.

v3.5.0 - Foreign key checks option

28 Jan 08:49

Choose a tag to compare

New Feature

  • --skip-fk-checks option: 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-checks

This 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

Thanks to @aomini for PR #157.

v3.4.0 - Database connection in seeders

28 Jan 08:45

Choose a tag to compare

Fix

  • Database connection in seeders: When using --database with a non-default connection, the generated seeder now properly uses DB::connection('name')->table() instead of just DB::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=mysql2

Thanks

Thanks to @Endy-c for PR #212.

v3.3.0 - Custom stub templates

28 Jan 08:40

Choose a tag to compare

New Feature

  • Custom stub templates: Specify a custom stub path via config/iseed.php to 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

28 Jan 08:35

Choose a tag to compare

New Feature

  • --noregister option: Generate seed files without adding them to DatabaseSeeder.php. Useful for creating backup seeders or manually managing which seeders are registered.

Usage

php artisan iseed users --noregister

Thanks

Thanks to @VukTodorovic for the original PR #230 (renamed from --noseed to --noregister for clearer semantics).

Code quality improvements

28 Jan 08:22

Choose a tag to compare

What's Changed

Small fixes and code quality improvements.

Changes

Full Changelog: v3.1.2...v3.1.3