diff --git a/app/database/migrations/2026_05_25_120100_seed_direct_supplier.php b/app/database/migrations/2026_05_25_120100_seed_direct_supplier.php new file mode 100644 index 00000000..ea4d4850 --- /dev/null +++ b/app/database/migrations/2026_05_25_120100_seed_direct_supplier.php @@ -0,0 +1,41 @@ +where('code', 'b1')->first(); + if ($b1 === null) { + // Если B1 нет — significant prod drift, не должно произойти. + // Создаём с дефолтным cost_rub=1.00 (как на prod 25.05.2026). + $costRub = '1.00'; + } else { + $costRub = (string) $b1->cost_rub; + } + + DB::table('suppliers')->updateOrInsert( + ['code' => 'direct'], + [ + 'name' => 'DIRECT — Прямые проекты', + 'cost_rub' => $costRub, + ] + ); + } + + public function down(): void + { + DB::table('suppliers')->where('code', 'direct')->delete(); + } +}; diff --git a/docs/observer/STATUS.md b/docs/observer/STATUS.md index 18f5d25b..eaa8b644 100644 --- a/docs/observer/STATUS.md +++ b/docs/observer/STATUS.md @@ -1,6 +1,6 @@ # Brain Status (auto-generated) -Last updated: 2026-05-25T14:54:22.281Z +Last updated: 2026-05-25T14:58:58.369Z | Контролёр | Состояние | Детали | |---|---|---|