Added machine id column migration file for alert mail rule table
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 27s

This commit is contained in:
dhanabalan
2026-08-18 12:43:49 +05:30
parent e7acc56943
commit 7fcb3ebcb2

View File

@@ -0,0 +1,33 @@
<?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
{
$sql1 = <<<'SQL'
ALTER TABLE alert_mail_rules
ADD COLUMN machine_id BIGINT DEFAULT NULL,
ADD CONSTRAINT alert_mail_rules_machine_id_fkey
FOREIGN KEY (machine_id) REFERENCES machines(id);
SQL;
DB::statement($sql1);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Schema::table('alert_mail_rules', function (Blueprint $table) {
// //
// });
}
};