Skip to content

Conversation

@dereuromark
Copy link
Member

Summary

  • Add --fake flag to seeds run command to mark seeds as executed without running them
  • Add --seed option to seeds reset command for selective seed reset

New features

Fake seeding:

# Mark a seed as executed without running it
bin/cake seeds run Users --fake

# Useful when you've manually populated data or want to skip certain seeds

Selective reset:

# Reset only specific seeds
bin/cake seeds reset --seed Users
bin/cake seeds reset --seed Users,Posts

# Still supports resetting all seeds (existing behavior)
bin/cake seeds reset

Both features mirror similar functionality available in migrations.

Makes seed name display consistent across all commands by removing the
'Seed' suffix. The run command confirmation was already doing this, but
status, reset, and execution output still showed the full class name.
Changes output from "Users" to "Users seed" to make it clearer
that seeds are being displayed, not other entities.
- Add --fake flag to mark seeds as executed without running them
- Add --seed option to seeds reset for selective seed reset
- Both features mirror similar functionality in migrations
@dereuromark dereuromark force-pushed the seed-fake-and-selective-reset branch from 0a5febc to b9227fd Compare January 3, 2026 15:42
Comment on lines +157 to +159
if (str_ends_with($seedName, 'Seed')) {
$seedName = substr($seedName, 0, -4);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More copies of that renaming function 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can rebase once the other PR is merged, and reuse the same method then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants