Closed PaulMcITS closed 1 year ago
I have the same issue in Laravel 9, I tried changing the class name but still not working.
bump, same issue.
Fix:
Strange this used to work perfectly, but you're right @musznik changing the migration to an anonymous migration works.
I'll push a release to change this in the package.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ms_graph_tokens', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->nullable();
$table->string('email')->nullable();
$table->text('access_token');
$table->text('refresh_token')->nullable();
$table->string('expires');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ms_graph_tokens');
}
};
I've just released this change https://github.com/dcblogdev/laravel-microsoft-graph/releases/tag/v3.1.7
Faced this issue with laravel 8 and dcblogdev/laravel-microsoft-graph v3.2.0
downgrade to 3.1.5 solved it
edit: this pull request might be interesting https://github.com/dcblogdev/laravel-microsoft-graph/pull/59
Hi,
The published migrations fail (in laravel 9 anyway) with Cannot declare class create_ms_graph_tokens_table, because the name is already in use
I had to change the class name to CreateMsGraphTokensTable to get the migration to run.
Cheers!