fix: Add error handling to dependencies + cleanup migrations

- Add detailed error handling in DependencyModel (throw exceptions on failure)
- Add try-catch in ticket_dependencies.php to catch query errors
- Remove all old migrations (001-014) that have already been run
- Keep only new feature migrations (015-018) for reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-20 17:07:54 -05:00
parent 2ce4a14201
commit 7462d7c509
22 changed files with 18 additions and 534 deletions

View File

@@ -74,8 +74,12 @@ switch ($method) {
ResponseHelper::error('Ticket ID required');
}
$dependencies = $dependencyModel->getDependencies($ticketId);
$dependents = $dependencyModel->getDependentTickets($ticketId);
try {
$dependencies = $dependencyModel->getDependencies($ticketId);
$dependents = $dependencyModel->getDependentTickets($ticketId);
} catch (Exception $e) {
ResponseHelper::serverError('Query error: ' . $e->getMessage());
}
ResponseHelper::success([
'dependencies' => $dependencies,