fix: use configured credentials for tenant schema cleanup
Same hardcoded dev credentials bug as InfrastructureService — TenantDataCleanupService.dropPostgresSchema() used "cameleer"/"cameleer_dev" instead of the provisioning properties, causing schema DROP to fail on production installs during tenant deletion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ public class TenantDataCleanupService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Connection conn = DriverManager.getConnection(url, "cameleer", "cameleer_dev");
|
try (Connection conn = DriverManager.getConnection(url, props.datasourceUsername(), props.datasourcePassword());
|
||||||
Statement stmt = conn.createStatement()) {
|
Statement stmt = conn.createStatement()) {
|
||||||
stmt.execute("DROP SCHEMA IF EXISTS \"" + schema + "\" CASCADE");
|
stmt.execute("DROP SCHEMA IF EXISTS \"" + schema + "\" CASCADE");
|
||||||
log.info("Dropped PostgreSQL schema: {}", schema);
|
log.info("Dropped PostgreSQL schema: {}", schema);
|
||||||
|
|||||||
Reference in New Issue
Block a user