database/migrations/2023_02_12_080500_create_social_accounts_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSocialAccountsTable extends Migration
{
public function up(): void
{
Schema::create('social_accounts', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->string('provider');
$table->string('provider_id');
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users');
});
}
public function down(): void
{
Schema::dropIfExists('pre_users');
}
}