feat: is_read di violation_notifications + unread count + mark all read
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?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::table('violation_notifications', function (Blueprint $table) {
|
||||
$table->boolean('is_read')->default(false)->after('status');
|
||||
$table->timestamp('read_at')->nullable()->after('is_read');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('violation_notifications', function (Blueprint $table) {
|
||||
$table->dropColumn(['is_read', 'read_at']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user