Should migrate if table doesn't exists...
Try to use the --path=[=PATH] option to migrate the password reset table.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
After some trouble with migrations I used the refresh command, my password_reset table got deleted and I made some big changes to my project, now all my tables are restored, but one is missing (the password reset table). How can I use artisan to generate it again?
I already run this commands, no success:
C:\xampp\htdocs\projekt>php artisan cache:clear
Application cache cleared!
C:\xampp\htdocs\projekt>php artisan migrate
Nothing to migrate.
I deleted the migration before accidentally too, previous to Laravel 5.2 there was a command to generate the migration for the password_resets table, but it seems to be removed, anyways here it is:
file name: 2014_10_12_100000_create_password_resets_table.php
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token')->index();
$table->timestamp('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}
Please or to participate in this conversation.