@mastra/mysql 0.12.0 → 0.12.1-alpha.0

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
@@ -9126,12 +9126,13 @@ var SchedulesMySQL = class SchedulesMySQL extends SchedulesStorage {
9126
9126
  if (!updated) throw new Error(`Schedule ${id} not found`);
9127
9127
  return updated;
9128
9128
  }
9129
- async updateScheduleNextFire(id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId) {
9130
- const [result] = await this.pool.execute(`UPDATE ${formatTableName(TABLE_SCHEDULES)} SET ${quoteIdentifier("next_fire_at", "column name")} = ?, ${quoteIdentifier("last_fire_at", "column name")} = ?, ${quoteIdentifier("last_run_id", "column name")} = ?, ${quoteIdentifier("updated_at", "column name")} = ? WHERE ${quoteIdentifier("id", "column name")} = ? AND ${quoteIdentifier("next_fire_at", "column name")} = ? AND ${quoteIdentifier("status", "column name")} = ?`, [
9129
+ async updateScheduleNextFire(id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId, newStatus) {
9130
+ const [result] = await this.pool.execute(`UPDATE ${formatTableName(TABLE_SCHEDULES)} SET ${quoteIdentifier("next_fire_at", "column name")} = ?, ${quoteIdentifier("last_fire_at", "column name")} = ?, ${quoteIdentifier("last_run_id", "column name")} = ?, ${quoteIdentifier("updated_at", "column name")} = ?, ${quoteIdentifier("status", "column name")} = COALESCE(?, ${quoteIdentifier("status", "column name")}) WHERE ${quoteIdentifier("id", "column name")} = ? AND ${quoteIdentifier("next_fire_at", "column name")} = ? AND ${quoteIdentifier("status", "column name")} = ?`, [
9131
9131
  newNextFireAt,
9132
9132
  lastFireAt,
9133
9133
  lastRunId,
9134
9134
  Date.now(),
9135
+ newStatus ?? null,
9135
9136
  id,
9136
9137
  expectedNextFireAt,
9137
9138
  "active"