OwlCyberSecurity - MANAGER
Edit File: 2024_10_01_111151_create_single_payment_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('single_payment', function (Blueprint $table) { $table->id()->unsigned(); $table->decimal('amount', 18, 0); $table->enum('payment_status', ['Preinitiated', 'Initiated', 'Succeeded', 'Failed'])->nullable(); $table->string('bank_transaction_id', 255)->nullable(); $table->string('bank_reference_id', 255)->nullable(); $table->string('card_number', 25)->nullable(); $table->string('description', 400)->nullable(); $table->enum('status', ['charge', 'discharge', 'admin-charge', 'admin-discharge'])->nullable(); $table->unsignedBigInteger('user_id'); $table->enum('source', ['app', 'web'])->default('web'); $table->unsignedBigInteger('user_bank_id')->nullable(); $table->softDeletes(); $table->timestamps(); // Define the foreign key constraint if needed, for example: // $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('single_payment'); } };