mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-01-02 09:01:01 -06:00
The db:seed command invokes the root seeder DatabaseSeeder which can invoke another seeders using the call() related methods. The root seeder can be set by the --class command-line option and also by the --seeder cmd. line option on some other commands like migrate:fresh/refresh. Seeders can be passed to the Tom application in the similar way like the migrations using the TomApplication::seeders<>() method or through the constructor. Arguments can be passed to the call<>() method, then the seeders run() method will not be called using the virtual dispatch but using the type traits. Of course the arguments passed to the call<>() method has to match with the run() method parameters. Others: - unified usingConnection() across all commands, this functionality was extracted to own class, previous it was a part of the Migrator class, so now every command even if it doesn't use Migrator can call the usingConnection() and it correctly sets a default connection and SQL queries debugging on the base of the -vvv command-line argument - a default database connection is now required, if not set then the exception will be thrown - added example seeders to the Tom application