DatabaseMigrations
trait DatabaseMigrations (View source)
Traits
| CanConfigureMigrationCommands |
Methods
| array | migrateFreshUsing()
The parameters that should be used when running "migrate:fresh". | from CanConfigureMigrationCommands |
| bool | shouldDropViews()
Determine if views should be dropped when refreshing the database. | from CanConfigureMigrationCommands |
| bool | shouldDropTypes()
Determine if types should be dropped when refreshing the database. | from CanConfigureMigrationCommands |
| bool | shouldSeed()
Determine if the seed task should be run when refreshing the database. | from CanConfigureMigrationCommands |
| mixed | seeder()
Determine the specific seeder class that should be used when refreshing the database. | from CanConfigureMigrationCommands |
| void | runDatabaseMigrations()
Define hooks to migrate the database before and after each test. | |
| void | refreshTestDatabase()
Refresh a conventional test database. | |
| void | beforeRefreshingDatabase()
Perform any work that should take place before the database has started refreshing. | |
| void | afterRefreshingDatabase()
Perform any work that should take place once the database has finished refreshing. |
Details
protected array migrateFreshUsing()
The parameters that should be used when running "migrate:fresh".
protected bool shouldDropViews()
Determine if views should be dropped when refreshing the database.
protected bool shouldDropTypes()
Determine if types should be dropped when refreshing the database.
protected bool shouldSeed()
Determine if the seed task should be run when refreshing the database.
protected mixed seeder()
Determine the specific seeder class that should be used when refreshing the database.
void runDatabaseMigrations()
Define hooks to migrate the database before and after each test.
protected void refreshTestDatabase()
Refresh a conventional test database.
protected void beforeRefreshingDatabase()
Perform any work that should take place before the database has started refreshing.
protected void afterRefreshingDatabase()
Perform any work that should take place once the database has finished refreshing.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Foundation/Testing/DatabaseMigrations.html