I think the question is explicit but let be more precise.
A client of mine have a DB which is created and seeded by his system, on top of that I have a few migrations made by Laravel. For testing purposes I need to create Objects created by the tables of my client so I want to create migrations for these "outside" and apply this only in the testing environment.
You can create a separate folder for these migrations and then override runDatabaseMigrations method from DatabaseMigrations trait by setting --path param to migration:fresh command to your main and testing migration folders. So that testing migrations would only run when migrating testing database.
You can check your .env file to run some migrations.
public function up()
{
if (env('APP_ENV') == 'testing'){
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->timestampsTz();
});
}
}