Added foreign key invoice_master_id in alert mail rules table
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / review (pull_request) Failing after 42s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Laravel Pint / pint (pull_request) Successful in 1m49s
Laravel Larastan / larastan (pull_request) Failing after 3m5s

This commit is contained in:
dhanabalan
2026-01-03 11:55:25 +05:30
parent aec52493f5
commit 11ce78b664

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
{
$sql = <<<'SQL'
ALTER TABLE alert_mail_rules
ADD COLUMN invoice_master_id BIGINT DEFAULT NULL,
ADD CONSTRAINT invoice_masters_invoice_master_id_fkey
FOREIGN KEY (invoice_master_id) REFERENCES invoice_masters(id);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Schema::table('alert_mail_rules', function (Blueprint $table) {
// //
// });
}
};