From 1875fae49050b62d33b239de9f771f13758df54a Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Sun, 27 Apr 2025 15:48:46 +0700 Subject: [PATCH] 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. --- ...4_26_110512_create_notifications_table.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 database/migrations/2025_04_26_110512_create_notifications_table.php diff --git a/database/migrations/2025_04_26_110512_create_notifications_table.php b/database/migrations/2025_04_26_110512_create_notifications_table.php new file mode 100644 index 0000000..d738032 --- /dev/null +++ b/database/migrations/2025_04_26_110512_create_notifications_table.php @@ -0,0 +1,31 @@ +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'); + } +};