gencow 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/index.js +5 -5
- package/server/index.js.map +2 -2
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -71248,11 +71248,11 @@ function createAdminRoutes(db, rawSql, driver, getCtx, storage) {
|
|
|
71248
71248
|
admin.get("/tables", async (c) => {
|
|
71249
71249
|
let schemaName = "public";
|
|
71250
71250
|
try {
|
|
71251
|
-
const spRows = await rawSql(`
|
|
71252
|
-
const
|
|
71253
|
-
const
|
|
71254
|
-
if (
|
|
71255
|
-
schemaName =
|
|
71251
|
+
const spRows = await rawSql(`SELECT current_schemas(true) as schemas`);
|
|
71252
|
+
const schemas = spRows[0]?.schemas || [];
|
|
71253
|
+
const appSchema = schemas.find((s) => s.startsWith("app_"));
|
|
71254
|
+
if (appSchema) {
|
|
71255
|
+
schemaName = appSchema;
|
|
71256
71256
|
}
|
|
71257
71257
|
} catch {
|
|
71258
71258
|
}
|