From 105ec4f2421abcd7628ceb886f24e4a3a2f1407c Mon Sep 17 00:00:00 2001 From: Soumyadas15 Date: Mon, 23 Jun 2025 17:41:38 +0530 Subject: [PATCH] chore(dev): fix templates migration --- .../migrations/20250103000001_agent_template_metadata.sql | 6 ------ .../migrations/20250130000000_secure_mcp_credentials.sql | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 backend/supabase/migrations/20250103000001_agent_template_metadata.sql diff --git a/backend/supabase/migrations/20250103000001_agent_template_metadata.sql b/backend/supabase/migrations/20250103000001_agent_template_metadata.sql deleted file mode 100644 index e7509c2d..00000000 --- a/backend/supabase/migrations/20250103000001_agent_template_metadata.sql +++ /dev/null @@ -1,6 +0,0 @@ -BEGIN; - -ALTER TABLE agent_templates ADD COLUMN IF NOT EXISTS metadata JSONB DEFAULT '{}'::jsonb; -CREATE INDEX IF NOT EXISTS idx_agent_templates_metadata ON agent_templates USING gin(metadata); - -COMMIT; \ No newline at end of file diff --git a/backend/supabase/migrations/20250130000000_secure_mcp_credentials.sql b/backend/supabase/migrations/20250130000000_secure_mcp_credentials.sql index 0180b540..2494b6fb 100644 --- a/backend/supabase/migrations/20250130000000_secure_mcp_credentials.sql +++ b/backend/supabase/migrations/20250130000000_secure_mcp_credentials.sql @@ -27,7 +27,8 @@ CREATE TABLE IF NOT EXISTS agent_templates ( created_at TIMESTAMPTZ DEFAULT NOW(), updated_at TIMESTAMPTZ DEFAULT NOW(), avatar VARCHAR(10), - avatar_color VARCHAR(7) + avatar_color VARCHAR(7), + metadata JSONB DEFAULT '{}'::jsonb ); -- Indexes for agent_templates @@ -37,6 +38,7 @@ CREATE INDEX IF NOT EXISTS idx_agent_templates_marketplace_published_at ON agent CREATE INDEX IF NOT EXISTS idx_agent_templates_download_count ON agent_templates(download_count); CREATE INDEX IF NOT EXISTS idx_agent_templates_tags ON agent_templates USING gin(tags); CREATE INDEX IF NOT EXISTS idx_agent_templates_created_at ON agent_templates(created_at); +CREATE INDEX IF NOT EXISTS idx_agent_templates_metadata ON agent_templates USING gin(metadata); -- ===================================================== -- 2. USER MCP CREDENTIALS TABLE