Skip to content

A free open source IT asset/license management system

Add alert_on_response to Category

Marcus Moore96bce301a0ff
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 0321dfdb26..0fd896b35d 100755
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -32,6 +32,7 @@ class Category extends SnipeModel
protected $hidden = ['created_by', 'deleted_at'];
protected $casts = [
+ 'alert_on_response' => 'boolean',
'created_by' => 'integer',
];
diff --git a/database/migrations/2025_06_05_204139_add_alert_on_response_to_categories_table.php b/database/migrations/2025_06_05_204139_add_alert_on_response_to_categories_table.php
new file mode 100644
index 0000000000..dc2bdae1b2
--- /dev/null
+++ b/database/migrations/2025_06_05_204139_add_alert_on_response_to_categories_table.php
@@ -0,0 +1,27 @@
+<?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::table('categories', function (Blueprint $table) {
+ $table->boolean('alert_on_response')->default(0)->after('require_acceptance');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('categories', function (Blueprint $table) {
+ $table->dropColumn('alert_on_response');
+ });
+ }
+};