The Laravel Artisan Cheatsheet now has an API. Learn more.

migrate:fresh

Drop all tables and re-run all migrations

Options

  • database - The database connection to use Optional
  • drop-views - Drop all tables and views Optional
  • drop-types - Drop all tables and types (Postgres only) Optional
  • force - Force the operation to run when in production Optional
  • path - The path to the migrations files to be executed Optional
  • realpath - Indicate any provided migration file paths are pre-resolved absolute paths Optional
  • seed - Indicates if the seed task should be re-run Optional
  • seeder - The class name of the root seeder Optional
  • step - Force the migrations to be run so they can be rolled back individually Optional
php artisan migrate:fresh [--database [DATABASE]] [--drop-views] [--drop-types] [--force] [--path [PATH]] [--realpath] [--seed] [--seeder [SEEDER]] [--step]