Files
portal-api/database/migrations/2024_01_31_163344_ticket_reply.php
2025-07-24 16:18:27 +07:00

37 lines
924 B
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.
*
* @return void
*/
public function up()
{
Schema::create('ticket_reply',function (Blueprint $table) {
$table->id()->autoIncrement();
$table->bigInteger('ticket_id')->default(0)->index();
$table->bigInteger('customer_id')->default(0)->index();
$table->text('message')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('user')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ticket_reply');
}
};