change the test case to adopt two path of migrations

This commit is contained in:
2024-08-18 10:49:26 +00:00
parent 2246f18d07
commit b0a4bd2151

View File

@@ -8,4 +8,16 @@ use Illuminate\Foundation\Testing\WithFaker;
abstract class TestCase extends BaseTestCase abstract class TestCase extends BaseTestCase
{ {
use CreatesApplication, WithFaker; use CreatesApplication, WithFaker;
public function artisan($command, $parameters = [])
{
$migrate = explode(':', $command);
if ($migrate[0] == "migrate" && !isset($parameters['--path'])) {
$parameters['--path'] = ['/database/old_migrations/', 'database/migrations'];
}
return parent::artisan($command, $parameters);
}
} }