@mastra/pg 1.22.3-alpha.0 → 1.22.3-alpha.1

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.
@@ -3,7 +3,7 @@ name: mastra-pg
3
3
  description: Documentation for @mastra/pg. Use when working with @mastra/pg APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/pg"
6
- version: "1.22.3-alpha.0"
6
+ version: "1.22.3-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.22.3-alpha.0",
2
+ "version": "1.22.3-alpha.1",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -20751,6 +20751,8 @@ function rowToDefinition(row) {
20751
20751
  if (stateSchema !== void 0 && stateSchema !== null) def.stateSchema = stateSchema;
20752
20752
  const requestContextSchema = parseJsonResilient(row.requestContextSchema);
20753
20753
  if (requestContextSchema !== void 0 && requestContextSchema !== null) def.requestContextSchema = requestContextSchema;
20754
+ const schedule = parseJsonResilient(row.schedule);
20755
+ if (schedule !== void 0 && schedule !== null) def.schedule = schedule;
20754
20756
  if (row.authorId != null) def.authorId = String(row.authorId);
20755
20757
  return def;
20756
20758
  }
@@ -20808,6 +20810,11 @@ var WorkflowDefinitionsPG = class WorkflowDefinitionsPG extends _mastra_core_sto
20808
20810
  tableName: _mastra_core_storage.TABLE_WORKFLOW_DEFINITIONS,
20809
20811
  schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_WORKFLOW_DEFINITIONS]
20810
20812
  });
20813
+ await this.#db.alterTable({
20814
+ tableName: _mastra_core_storage.TABLE_WORKFLOW_DEFINITIONS,
20815
+ schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_WORKFLOW_DEFINITIONS],
20816
+ ifNotExists: ["schedule"]
20817
+ });
20811
20818
  await this.createDefaultIndexes();
20812
20819
  await this.createCustomIndexes();
20813
20820
  }
@@ -20829,6 +20836,7 @@ var WorkflowDefinitionsPG = class WorkflowDefinitionsPG extends _mastra_core_sto
20829
20836
  stateSchema: input.stateSchema ?? null,
20830
20837
  requestContextSchema: input.requestContextSchema ?? null,
20831
20838
  graph: input.graph,
20839
+ schedule: "schedule" in input ? input.schedule ?? null : null,
20832
20840
  status: "active",
20833
20841
  source: "storage",
20834
20842
  authorId: "authorId" in input ? input.authorId ?? null : null,
@@ -20859,6 +20867,7 @@ var WorkflowDefinitionsPG = class WorkflowDefinitionsPG extends _mastra_core_sto
20859
20867
  if ("stateSchema" in input && input.stateSchema !== void 0) data.stateSchema = input.stateSchema;
20860
20868
  if ("requestContextSchema" in input && input.requestContextSchema !== void 0) data.requestContextSchema = input.requestContextSchema;
20861
20869
  if ("graph" in input && input.graph !== void 0) data.graph = input.graph;
20870
+ if ("schedule" in input && input.schedule !== void 0) data.schedule = input.schedule;
20862
20871
  if ("status" in input && input.status !== void 0) data.status = input.status;
20863
20872
  if ("authorId" in input && input.authorId !== void 0) data.authorId = input.authorId;
20864
20873
  await this.#db.update({