21 lines
926 B
PHP
21 lines
926 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
use Illuminate\Support\Facades\DB;
|
||
|
|
|
||
|
|
// FN-2 (приёмка 22.06.2026): DEFAULT колонки users.notification_preferences содержал
|
||
|
|
// мёртвый ключ "reminder" (фича «Напоминания» снята в v8.45, но миграция
|
||
|
|
// drop_reminders_table забыла поправить дефолт). Контракт: дефолт без "reminder".
|
||
|
|
test('DEFAULT users.notification_preferences не содержит мёртвый ключ reminder', function () {
|
||
|
|
$def = DB::selectOne(
|
||
|
|
"SELECT column_default FROM information_schema.columns
|
||
|
|
WHERE table_name = 'users' AND column_name = 'notification_preferences'"
|
||
|
|
);
|
||
|
|
|
||
|
|
expect($def)->not->toBeNull();
|
||
|
|
expect($def->column_default)->not->toContain('reminder');
|
||
|
|
// sanity: канон-события на месте
|
||
|
|
expect($def->column_default)->toContain('new_lead');
|
||
|
|
});
|