You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Define hooks to migrate the database before and after each test. * * @return void */publicfunctionrunDatabaseMigrations()
{
$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.
The text was updated successfully, but these errors were encountered:
In the DatabaseMigrations trait:
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.
The text was updated successfully, but these errors were encountered: