Files
HRM-System/database/migrations/2025_01_28_000001_create_webhooks_table.php
2026-04-13 08:16:56 +08:00

27 lines
743 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('webhooks', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->enum('module', ['New User', 'New Appointment']);
$table->enum('method', ['GET', 'POST']);
$table->string('url');
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
}
public function down(): void
{
Schema::dropIfExists('webhooks');
}
};