I am trying do to a very basic migration. When i run php artisan migrate i get this error:
Migrating: 2019_12_14_000001_create_personal_access_tokens_table
Illuminate\Database\QueryException
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'personal_access_tokens' already exists (SQL: create tab....///
As you can see, I dont have that "2019_12_14_000001_create_personal_access_tokens_table" migration in my migrations table.

I have done the following:
php artisan cache:clear
php artisan config:clear
./composer dump-autoload
And im still getting this ghost migration. What should i do?
The contents of the create_file_table file I am trying to run is:
public function up()
{
Schema::create('files', function (Blueprint $table) {
$table->id();
$table->string('quoteNumber');
$table->string('purchaseOrderNumber');
$table->string('name')->nullable();
$table->string('file_path')->nullable();
$table->timestamps();
});
}
2019_12_14_000001_create_personal_access_tokens_table
Is part of Laravel Sanctum.
You can publish it to your migrations folder by running the following command.
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
Otherwise it stays with the package and you will not see it in your migrations folder.
If you would like to ignore it you can follow the documentation included below.
Migration Customization
If you are not going to use Sanctum's default migrations, you should call the
Sanctum::ignoreMigrationsmethod in theregistermethod of yourApp\Providers\AppServiceProviderclass. You may export the default migrations by executing the following command:
php artisan vendor:publish --tag=sanctum-migrations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With