@mastra/mssql 1.7.3 → 1.7.4-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.
package/dist/index.js CHANGED
@@ -4132,6 +4132,12 @@ function rowToDefinition(row) {
4132
4132
  if (stateSchema != null) def.stateSchema = stateSchema;
4133
4133
  const requestContextSchema = parseJson(row.requestContextSchema, "requestContextSchema", row.id);
4134
4134
  if (requestContextSchema != null) def.requestContextSchema = requestContextSchema;
4135
+ try {
4136
+ const schedule = parseJson(row.schedule, "schedule", row.id);
4137
+ if (schedule != null) def.schedule = schedule;
4138
+ } catch {
4139
+ def.schedule = row.schedule;
4140
+ }
4135
4141
  if (row.authorId != null) def.authorId = String(row.authorId);
4136
4142
  return def;
4137
4143
  }
@@ -4166,6 +4172,11 @@ var WorkflowDefinitionsMSSQL = class WorkflowDefinitionsMSSQL extends WorkflowDe
4166
4172
  tableName: TABLE_WORKFLOW_DEFINITIONS,
4167
4173
  schema: WORKFLOW_DEFINITIONS_SCHEMA
4168
4174
  });
4175
+ await this.db.alterTable({
4176
+ tableName: TABLE_WORKFLOW_DEFINITIONS,
4177
+ schema: WORKFLOW_DEFINITIONS_SCHEMA,
4178
+ ifNotExists: ["schedule"]
4179
+ });
4169
4180
  await this.createDefaultIndexes();
4170
4181
  await this.createCustomIndexes();
4171
4182
  }
@@ -4210,6 +4221,7 @@ var WorkflowDefinitionsMSSQL = class WorkflowDefinitionsMSSQL extends WorkflowDe
4210
4221
  stateSchema: input.stateSchema ?? null,
4211
4222
  requestContextSchema: input.requestContextSchema ?? null,
4212
4223
  graph: input.graph,
4224
+ schedule: "schedule" in input ? input.schedule ?? null : null,
4213
4225
  status: "active",
4214
4226
  source: "storage",
4215
4227
  authorId: "authorId" in input ? input.authorId ?? null : null,
@@ -4240,6 +4252,7 @@ var WorkflowDefinitionsMSSQL = class WorkflowDefinitionsMSSQL extends WorkflowDe
4240
4252
  if ("stateSchema" in input && input.stateSchema !== void 0) data.stateSchema = input.stateSchema;
4241
4253
  if ("requestContextSchema" in input && input.requestContextSchema !== void 0) data.requestContextSchema = input.requestContextSchema;
4242
4254
  if ("graph" in input && input.graph !== void 0) data.graph = input.graph;
4255
+ if ("schedule" in input && input.schedule !== void 0) data.schedule = input.schedule;
4243
4256
  if ("status" in input && input.status !== void 0) data.status = input.status;
4244
4257
  if ("authorId" in input && input.authorId !== void 0) data.authorId = input.authorId;
4245
4258
  await this.db.update({