Skip to content

Commit

Permalink
Renamed artisan command to offline:seeder
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Jun 14, 2023
1 parent 068db21 commit 7e2973c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,19 @@ class Provider extends \System\Classes\AppBase
The `--plugins` flag can be used to seed specific entities:

```bash
php artisan plugin:seed --plugins=Blog\\Post
php artisan offline:seeder --plugins=Blog\\Post
```

## Migrate from 1.0
## Migrate from 2.x

October 3.3 introduced its own `plugin:seed` Artisan command. To
resolve this conflict, the Artisan command of this plugin was
renamed to `offline:seeder`.

No special migration work is required, you can just use the new
Artisan command.

## Migrate from 1.x

To migrate old seeders from Version 1.0 of this plugin, make the following changes:

Expand All @@ -174,15 +183,15 @@ YourModel::factory()->special()->make();

## Running seeders

Simply run `php artisan plugin:seed` to run the seeders of all plugins. The seeder of each plugin will be only run once.
Simply run `php artisan offline:seeder` to run the seeders of all plugins. The seeder of each plugin will be only run once.

To run a seeder for a already seeded plugin, use the `--fresh` option. Be aware that this will rollback and reinstall
all plugins with a registered seeder completely, so any plugin data will be lost.

You can use the `--plugins` option to run only specified seeders. Simply provide a comma-separated list of plugin names.

```
php artisan plugin:seed --plugins=Vendor.PluginA,Vendor.PluginB --fresh
php artisan offline:seeder --plugins=Vendor.PluginA,Vendor.PluginB --fresh
```

## Included factories
Expand Down
2 changes: 1 addition & 1 deletion console/PluginSeedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class PluginSeedCommand extends Command
{
protected $name = 'plugin:seed';
protected $name = 'offline:seeder';

protected $description = 'Runs all plugin seeders';

Expand Down
1 change: 1 addition & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
"2.0.2": "Fixed factory bug"
"2.1.0": "Implemented seeder support for Tailor entities"
"2.1.2": "Bugfix for Tailor seeders"
"3.0.0": "Renamed artisan command to offline:seeder, to prevent conflict with October 3.3"

0 comments on commit 7e2973c

Please sign in to comment.