D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
dateitor
/
public_html
/
database
/
migrations
/
Filename :
2023_01_04_112541_create_withdrawal_table.php
back
Copy
<?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('withdrawals', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('user_id'); $table->string('email'); $table->integer('amount'); $table->integer('is_approved')->default(0); $table->text('rejection_note')->nullable(); $table->timestamps(); $table->foreign('user_id')->references('id')->on('users'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('withdrawals'); } };