@voltagent/core 0.1.62 → 0.1.63

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
@@ -3899,7 +3899,9 @@ var LibSQLStorage = class {
3899
3899
  input TEXT,
3900
3900
  output TEXT,
3901
3901
  usage TEXT,
3902
- metadata TEXT
3902
+ metadata TEXT,
3903
+ userId TEXT,
3904
+ conversationId TEXT
3903
3905
  )
3904
3906
  `);
3905
3907
  const historyStepsTableName = `${this.options.tablePrefix}_agent_history_steps`;
@@ -5837,6 +5839,11 @@ var LibSQLStorage = class {
5837
5839
  }
5838
5840
  const hasUserIdColumn = tableInfo.rows.some((row) => row.name === "userId");
5839
5841
  const hasConversationIdColumn = tableInfo.rows.some((row) => row.name === "conversationId");
5842
+ if (hasUserIdColumn && hasConversationIdColumn) {
5843
+ this.debug("Both userId and conversationId columns already exist, skipping migration");
5844
+ await this.setMigrationFlag("agent_history_schema_migration", 0);
5845
+ return { success: true };
5846
+ }
5840
5847
  if (!hasUserIdColumn) {
5841
5848
  await this.client.execute(`ALTER TABLE ${historyTableName} ADD COLUMN userId TEXT`);
5842
5849
  this.debug("Added userId column to agent history table");