File: /var/www/console.fixgini.com/database/migrations/2024_11_09_141306_create_support_mails_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('support_mails', function (Blueprint $table) {
$table->id();
$table->string('subject', 255); // Subject
$table->text('message'); // Message
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('receiver_id', 255)->nullable(); // Receiver ID (nullable)
$table->string('ticket_no', 255); // Ticket number
$table->string('attachment', 255)->nullable();
$table->enum('status', ['open', 'closed'])->default('open');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('support_mails');
}
};