diff --git a/db/init.sql b/db/init.sql index 3eadd13..7e66871 100644 --- a/db/init.sql +++ b/db/init.sql @@ -56,7 +56,7 @@ CREATE TABLE IF NOT EXISTS workflow_checkpoints ( agent_name VARCHAR(128) NOT NULL, document_id UUID NOT NULL, current_activity VARCHAR(128) NOT NULL, - state_data JSONB, + state_data TEXT, is_completed BOOLEAN NOT NULL DEFAULT FALSE, is_failed BOOLEAN NOT NULL DEFAULT FALSE, error_message TEXT, diff --git a/src/Worker/Data/AppDbContext.cs b/src/Worker/Data/AppDbContext.cs index 577c02a..e82e625 100644 --- a/src/Worker/Data/AppDbContext.cs +++ b/src/Worker/Data/AppDbContext.cs @@ -43,7 +43,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.HasKey(e => e.Id); entity.Property(e => e.AgentName).HasMaxLength(128).IsRequired(); entity.Property(e => e.CurrentActivity).HasMaxLength(128).IsRequired(); - entity.Property(e => e.StateData).HasColumnType("jsonb"); + entity.Property(e => e.StateData).HasColumnType("text"); entity.Property(e => e.ErrorMessage).HasMaxLength(4096); entity.HasIndex(e => new { e.AgentName, e.DocumentId }); entity.HasIndex(e => e.IsCompleted);