Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

fix(migration): remap firecrawl rows in the down migration

rramprakash4245be118a5f
diff --git a/backend/migrations/sql/20260716_120000_add_firecrawl_search_type.sql b/backend/migrations/sql/20260716_120000_add_firecrawl_search_type.sql
index 6b95898e..48697c94 100644
--- a/backend/migrations/sql/20260716_120000_add_firecrawl_search_type.sql
+++ b/backend/migrations/sql/20260716_120000_add_firecrawl_search_type.sql
@@ -40,6 +40,12 @@ CREATE TYPE SEARCHENGINE_TYPE_NEW AS ENUM (
'sploitus'
);
+-- Remap any rows logged with the removed value so the narrowing cast below
+-- cannot fail; 'firecrawl' is a content-rich search engine like 'tavily'.
+UPDATE searchlogs
+ SET engine = 'tavily'
+ WHERE engine = 'firecrawl';
+
-- Update the searchlogs table to use the reverted enum type
ALTER TABLE searchlogs
ALTER COLUMN engine TYPE SEARCHENGINE_TYPE_NEW USING engine::text::SEARCHENGINE_TYPE_NEW;