v7.0.0-beta.2 release
This commit is contained in:
1 parent
6595fd0eb5
commit
fa8eba7a0d
1165 files changed
+107118
-762127
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* 사이트내 알림 테이블 생성 (Laravel 표준).
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary()->comment('UUID');
|
||||
$table->string('type')->comment('알림 클래스명');
|
||||
$table->string('notifiable_type')->comment('알림 수신 모델 타입');
|
||||
$table->unsignedBigInteger('notifiable_id')->comment('알림 수신 모델 ID');
|
||||
$table->index(['notifiable_type', 'notifiable_id']);
|
||||
$table->text('data')->comment('알림 데이터 (JSON)');
|
||||
$table->timestamp('read_at')->nullable()->comment('읽음 시각');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 사이트내 알림 테이블 삭제.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user