2

I deleted some of the migration files in my laravel app but after I run php artisan migrate command it still migrating the deleted migration files. I already tried composer dump-autoload and clearing caches still the same. What am I missing?

Migration sample:

<?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');
    }
}
Kieu Trung
  • 159
  • 1
  • 7
LAZYASSKID
  • 70
  • 8

2 Answers2

3

Fixed. It is coming from laravel/passport.

LAZYASSKID
  • 70
  • 8
1

Run the following artisan commands:

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

Then run:

composer dump-autoload

After that run migrate command:

php artisan migrate:fresh
Hedayatullah Sarwary
  • 2,664
  • 3
  • 24
  • 38