Skip to content

Commit

Permalink
Update Debug Mode DB Schema and Name (#219)
Browse files Browse the repository at this point in the history
To work correctly with the proxy, now we put all tables under the `dbos`
schema in the provenance DB, and we use the `userDB_prov` as the
corresponding provenance DB name.
  • Loading branch information
qianl15 authored Dec 12, 2023
1 parent 892defd commit c109f19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dbos-runtime/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { DBOSConfig, DBOSExecutor } from "../dbos-executor";
import { DBOSRuntime, DBOSRuntimeConfig, } from "./runtime";

export async function debugWorkflow(dbosConfig: DBOSConfig, runtimeConfig: DBOSRuntimeConfig, proxy: string, workflowUUID: string) {
dbosConfig = {...dbosConfig, debugProxy: proxy, system_database: "dbos_systemdb"};
dbosConfig.poolConfig.database = `${dbosConfig.poolConfig.database}_prov`;
const provDB = `${dbosConfig.poolConfig.database}_prov`;
dbosConfig = {...dbosConfig, debugProxy: proxy, system_database: provDB };
dbosConfig.poolConfig.database = provDB;

// Point to the correct system DB schema.
DBOSExecutor.systemDBSchemaName = "dbos_system";
DBOSExecutor.systemDBSchemaName = "dbos";

// Load classes
const classes = await DBOSRuntime.loadClasses(runtimeConfig.entrypoint);
Expand Down

0 comments on commit c109f19

Please sign in to comment.