@mastra/pg 0.13.1 → 0.13.2-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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @mastra/pg@0.13.1-alpha.0 build /home/runner/work/mastra/mastra/stores/pg
2
+ > @mastra/pg@0.13.2-alpha.0 build /home/runner/work/mastra/mastra/stores/pg
3
3
  > tsup --silent --config tsup.config.ts
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 0.13.2-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - a780fcd: ensure score id is generated for postgres store
8
+ - Updated dependencies [94f4812]
9
+ - Updated dependencies [e202b82]
10
+ - Updated dependencies [e00f6a0]
11
+ - @mastra/core@0.12.2-alpha.0
12
+
3
13
  ## 0.13.1
4
14
 
5
15
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2156,8 +2156,6 @@ var StoreOperationsPG = class extends storage.StoreOperations {
2156
2156
  ` : ""}
2157
2157
  `;
2158
2158
  await this.client.none(sql);
2159
- console.log("Alter Table SQL", tableName);
2160
- console.log("timeZColumnNames", timeZColumnNames);
2161
2159
  await this.alterTable({
2162
2160
  tableName,
2163
2161
  schema,
@@ -2391,17 +2389,19 @@ var ScoresPG = class extends storage.ScoresStorage {
2391
2389
  }
2392
2390
  async saveScore(score) {
2393
2391
  try {
2392
+ const scoreId = crypto.randomUUID();
2394
2393
  const { input, ...rest } = score;
2395
2394
  await this.operations.insert({
2396
2395
  tableName: storage.TABLE_SCORERS,
2397
2396
  record: {
2397
+ id: scoreId,
2398
2398
  ...rest,
2399
2399
  input: JSON.stringify(input),
2400
2400
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
2401
2401
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
2402
2402
  }
2403
2403
  });
2404
- const scoreFromDb = await this.getScoreById({ id: score.id });
2404
+ const scoreFromDb = await this.getScoreById({ id: scoreId });
2405
2405
  return { score: scoreFromDb };
2406
2406
  } catch (error$1) {
2407
2407
  throw new error.MastraError(
@@ -2423,8 +2423,6 @@ var ScoresPG = class extends storage.ScoresStorage {
2423
2423
  `SELECT COUNT(*) FROM ${getTableName({ indexName: storage.TABLE_SCORERS, schemaName: this.schema })} WHERE "runId" = $1`,
2424
2424
  [runId]
2425
2425
  );
2426
- console.log(`total: ${total?.count}`);
2427
- console.log(`typeof total: ${typeof total?.count}`);
2428
2426
  if (total?.count === "0" || !total?.count) {
2429
2427
  return {
2430
2428
  pagination: {