mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
WebUI - Alert Rule Editor: new notes field (#15631)
* add a new notes field to the rule editor. use a bigger text field for sql queries to avoid mistakes... * add api doc * allow notes field from the collection * add a sample notes to the collection * lint and db schema * unmix some schema changes from a nother PR * unmix schema update No°2 * unmix schema update No°3 - silly me * add strip_tags, minor optimisation, db default value * apply linting * db_schema empty '' as default * update db_schema.yaml * default value changed as 'BLOB, TEXT, GEOMETRY or JSON column 'notes' can't have a default value' * better keep the migration in 2023... * Update 2023_12_12_171400_alert_rule_note.php * Update create-alert-item.inc.php --------- Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
This commit is contained in:
28
database/migrations/2023_12_12_171400_alert_rule_note.php
Normal file
28
database/migrations/2023_12_12_171400_alert_rule_note.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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('alert_rules', function (Blueprint $table) {
|
||||
$table->text('notes')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('alert_rules', function (Blueprint $table) {
|
||||
$table->dropColumn('notes');
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user