forked from drfraker/snipe-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Snipe to seed the database after migrating it and auto-update o…
…n seed file change (drfraker#26) * Neatened up config file and added new settings for database seeding * Neatened up SnipeClearCommand and removed error suppression * Implemented database seeding capability when the configuration requires it * Add automatic snapshot update when seeding enabled and seed files changed * Fixing styling issue highlight from StyleCI
- Loading branch information
Showing
4 changed files
with
82 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
<?php | ||
|
||
return [ | ||
'snapshot-location' => __DIR__.'/../snapshots/snipe_snapshot.sql', | ||
'snipefile-location' => __DIR__.'/../snapshots/.snipe', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Storage Locations | ||
|-------------------------------------------------------------------------- | ||
| By default, SnipeMigrations will store snipe files and database snapshots | ||
| in /vendor/drfraker/snipe-migrations/snapshots. If you would like to | ||
| change the location of the files, update the paths below. | ||
*/ | ||
'snapshot-location' => base_path('vendor/drfraker/snipe-migrations/snapshots/').'snipe_snapshot.sql', | ||
'snipefile-location' => base_path('vendor/drfraker/snipe-migrations/snapshots/').'.snipe', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Database Seeding | ||
|-------------------------------------------------------------------------- | ||
| By default SnipeMigrations will refresh the database, run all migrations, | ||
| and start each test with an empty database. If you would like to seed | ||
| the database after refreshing it, enable the setting below. A custom | ||
| class can be set, otherwise, the default DatabaseSeeder will run. | ||
*/ | ||
'seed-database' => false, | ||
'seed-class' => 'DatabaseSeeder', | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters