feat(migration): tambah migrasi untuk tabel notifications

Menambahkan migrasi baru untuk tabel `notifications` dengan rincian:
- Membuat tabel `notifications` dengan kolom:
  - `id` (UUID, primary key).
  - `type` (string).
  - `notifiable` (morphs).
  - `data` (text).
  - `read_at` (timestamp, nullable).
  - `timestamps` (created_at dan updated_at).
- Menyediakan fungsi `up` untuk membuat tabel.
- Menyediakan fungsi `down` untuk menghapus tabel.
This commit is contained in:
Daeng Deni Mardaeni 2025-04-27 15:48:46 +07:00
parent 6c5a986458
commit 1875fae490

View File

@ -0,0 +1,31 @@
<?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('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->timestamp('read_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('notifications');
}
};