Skip to content

Commit

Permalink
fix: User deletion issue fk error
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Jan 26, 2024
1 parent 7972baa commit 8248e28
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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::table('user_extension_usage_stats', function (Blueprint $table) {
$table->dropForeign('user_extension_usage_stats_user_id_foreign');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};

0 comments on commit 8248e28

Please sign in to comment.