refactor: remove schema-manager and tenantSchema backward compat

Delete schema-manager.ts (replaced by TenantConnectionManager).
Remove deprecated tenantSchema from Express Request interface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Consultoria AS
2026-03-15 23:31:06 +00:00
parent 96e1ea554c
commit d8f9f92389
2 changed files with 0 additions and 110 deletions

View File

@@ -6,7 +6,6 @@ declare global {
namespace Express {
interface Request {
tenantPool?: Pool;
tenantSchema?: string; // @deprecated - use tenantPool instead
viewingTenantId?: string;
}
}
@@ -47,12 +46,7 @@ export async function tenantMiddleware(req: Request, res: Response, next: NextFu
req.viewingTenantId = viewedTenant.id;
}
// New pool-based approach
req.tenantPool = tenantDb.getPool(tenantId, databaseName);
// Backward compat: tenantSchema still used by controllers until Task 8 migration
req.tenantSchema = databaseName;
next();
} catch (error) {
console.error('[TenantMiddleware] Error:', error);