feat(followup-audio): soft delete unadopted recordings and expose extraction doubts

This commit is contained in:
2026-10-12 10:39:12 +08:00
parent 70ddc1a70a
commit 14e1722291
13 changed files with 426 additions and 18 deletions
+4
View File
@@ -122,6 +122,10 @@ try {
for ($i = 0; $i < 2; $i++) {
foreach (explode(';', $migration) as $statement) { if (trim($statement) !== '') { $stmt = $pdo->query($statement); $stmt->closeCursor(); } }
}
$migration = preg_replace('/^--.*$/m', '', file_get_contents(dirname(__DIR__) . '/sql/2026_10_12_followup_audio_soft_delete.sql'));
for ($i = 0; $i < 2; $i++) {
foreach (explode(';', $migration) as $statement) { if (trim($statement) !== '') { $stmt = $pdo->query($statement); $stmt->closeCursor(); } }
}
$expect((int) Db::name('followup_audio_mutex')->count() === 2, 'Migration is rerunnable');
$expect(count(array_filter(Fields::catalog()['diagnosis'], static fn ($f) => $f['key'] === 'status')) === 0, 'Ownership/status fields are not writable');
$catalog = array_column(Fields::catalog()['diagnosis'], null, 'key');