@mastra/pg 1.30.0-alpha.0 → 1.30.0-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.30.0-alpha.0"
6
+ version: "1.30.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.30.0-alpha.0",
2
+ "version": "1.30.0-alpha.1",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -20448,9 +20448,9 @@ var SchedulesPG = class SchedulesPG extends _mastra_core_storage.SchedulesStorag
20448
20448
  if (!updated) throw new Error(`Schedule ${id} not found`);
20449
20449
  return updated;
20450
20450
  }
20451
- async updateScheduleNextFire(id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId) {
20451
+ async updateScheduleNextFire(id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId, newStatus) {
20452
20452
  return ((await this.#client.query(`UPDATE ${this.#table(_mastra_core_storage.TABLE_SCHEDULES)}
20453
- SET next_fire_at = $1, last_fire_at = $2, last_run_id = $3, updated_at = $4
20453
+ SET next_fire_at = $1, last_fire_at = $2, last_run_id = $3, updated_at = $4, status = COALESCE($8, status)
20454
20454
  WHERE id = $5 AND next_fire_at = $6 AND status = $7`, [
20455
20455
  newNextFireAt,
20456
20456
  lastFireAt,
@@ -20458,7 +20458,8 @@ var SchedulesPG = class SchedulesPG extends _mastra_core_storage.SchedulesStorag
20458
20458
  Date.now(),
20459
20459
  id,
20460
20460
  expectedNextFireAt,
20461
- "active"
20461
+ "active",
20462
+ newStatus ?? null
20462
20463
  ])).rowCount ?? 0) > 0;
20463
20464
  }
20464
20465
  async deleteSchedule(id) {