我在我的laravel应用程序中删除了一些迁移文件,但在我运行php artisan migrate命令后,它仍然在迁移删除的迁移文件。我已经尝试了composer dump-autoload和清除缓存仍然是一样的。我遗漏了什么?
迁移示例:
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}发布于 2021-03-16 22:09:38
已修复。它来自laravel/passport。
发布于 2021-03-12 01:13:52
运行以下artisan命令:
1. php artisan config:cache
2. php artisan config:clear
3. php artisan cache:clear
4. php artisan route:clear
5. php artisan view:clear然后运行:
composer dump-autoload在运行迁移命令之后:
php artisan migrate:freshhttps://stackoverflow.com/questions/66586946
复制相似问题