99use Hyperf \Database \Commands \Seeders \SeedCommand ;
1010use Hyperf \Database \Commands \Migrations \RollbackCommand ;
1111use Symfony \Component \Console \Input \ArrayInput ;
12+ use Symfony \Component \Console \Input \StringInput ;
1213use Symfony \Component \Console \Output \BufferedOutput ;
1314
1415trait InteractsWithConsole
1516{
1617 public function fresh (): string
1718 {
18- $ input = new ArrayInput ([] );
19+ $ input = new StringInput ( ' --database=sqlite ' );
1920 $ output = new BufferedOutput ();
2021
2122 ApplicationContext::getContainer ()->get (FreshCommand::class)->run ($ input , $ output );
@@ -25,7 +26,7 @@ public function fresh(): string
2526
2627 public function rollback (): string
2728 {
28- $ input = new ArrayInput ([] );
29+ $ input = new StringInput ( ' --database=sqlite ' );
2930 $ output = new BufferedOutput ();
3031
3132 ApplicationContext::getContainer ()->get (RollbackCommand::class)->run ($ input , $ output );
@@ -35,7 +36,7 @@ public function rollback(): string
3536
3637 public function seed (): string
3738 {
38- $ input = new ArrayInput ([] );
39+ $ input = new StringInput ( ' --database=sqlite ' );
3940 $ output = new BufferedOutput ();
4041
4142 ApplicationContext::getContainer ()->get (SeedCommand::class)->run ($ input , $ output );
0 commit comments