-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
In the DatabaseMigrations trait:
/**
* Define hooks to migrate the database before and after each test.
*
* @return void
*/
public function runDatabaseMigrations()
{
$this->beforeRefreshingDatabase();
$this->refreshTestDatabase();
$this->afterRefreshingDatabase();
$this->beforeApplicationDestroyed(function () {
$this->artisan('migrate:rollback');
RefreshDatabaseState::$migrated = false;
});
}The "migrate:rollback" call is basically reverting all of the fresh migration, so the second time the tests run, the checksum matches while the database is completely empty.
Not sure if this is due to a code update, or if there's a best practices way of avoiding this.
For now, I've overridden the runDatabaseMigrations method to remove the rollback command.
Metadata
Metadata
Assignees
Labels
No labels