File: //proc/2147229/cwd/database/migrations/2024_00_11_112904_create_merchants_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('merchants', function (Blueprint $table) {
$table->foreign('user_id')->references('id')->on('users');
$table->unsignedBigInteger('user_id');
$table->string('id')->unique()->comment('Merchant ID');
$table->string('name')->nullable()->comment('Merchant Name');
$table->string('api_secret_key')->comment('API Secret Key');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('merchants');
}
};