Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix(migrations): correct migration numbers and remove broken trigger

ChenRussell2cbd98e36f26
diff --git a/migrations/versioned/000029_datasource_tables.up.sql b/migrations/versioned/000029_datasource_tables.up.sql
index 932dd5622..12292f9e6 100644
--- a/migrations/versioned/000029_datasource_tables.up.sql
+++ b/migrations/versioned/000029_datasource_tables.up.sql
@@ -1,6 +1,6 @@
--- Migration: 000028_datasource_tables
+-- Migration: 000029_datasource_tables
-- Description: Create data_sources and sync_logs tables for external data source management
-DO $$ BEGIN RAISE NOTICE '[Migration 000028] Creating data_sources and sync_logs tables'; END $$;
+DO $$ BEGIN RAISE NOTICE '[Migration 000029] Creating data_sources and sync_logs tables'; END $$;
-- Create data_sources table for managing external data source configurations
CREATE TABLE IF NOT EXISTS data_sources (
@@ -57,4 +57,4 @@ CREATE INDEX IF NOT EXISTS idx_sync_logs_status ON sync_logs (status);
CREATE INDEX IF NOT EXISTS idx_sync_logs_started_at ON sync_logs (started_at);
-DO $$ BEGIN RAISE NOTICE '[Migration 000028] data_sources and sync_logs tables created successfully'; END $$;
+DO $$ BEGIN RAISE NOTICE '[Migration 000029] data_sources and sync_logs tables created successfully'; END $$;
diff --git a/migrations/versioned/000030_web_search_providers.up.sql b/migrations/versioned/000030_web_search_providers.up.sql
index c10ae37c3..098d27d97 100644
--- a/migrations/versioned/000030_web_search_providers.up.sql
+++ b/migrations/versioned/000030_web_search_providers.up.sql
@@ -1,6 +1,6 @@
--- Migration: 000029_web_search_providers
+-- Migration: 000030_web_search_providers
-- Description: Create web_search_providers table for tenant-specific search engine configurations
-DO $$ BEGIN RAISE NOTICE '[Migration 000029] Creating web_search_providers table'; END $$;
+DO $$ BEGIN RAISE NOTICE '[Migration 000030] Creating web_search_providers table'; END $$;
-- Create web_search_providers table for managing tenant search engine configurations
-- Each row represents a configured search provider instance (e.g., "Production Bing", "Test Google")
@@ -22,10 +22,4 @@ CREATE INDEX IF NOT EXISTS idx_web_search_providers_tenant_id ON web_search_prov
CREATE INDEX IF NOT EXISTS idx_web_search_providers_provider ON web_search_providers (provider);
CREATE INDEX IF NOT EXISTS idx_web_search_providers_deleted_at ON web_search_providers (deleted_at);
--- Auto-update updated_at column (reuses the function from migration 000028)
-CREATE TRIGGER trg_web_search_providers_updated_at
- BEFORE UPDATE ON web_search_providers
- FOR EACH ROW
- EXECUTE FUNCTION update_updated_at_column();
-
-DO $$ BEGIN RAISE NOTICE '[Migration 000029] web_search_providers table created successfully'; END $$;
+DO $$ BEGIN RAISE NOTICE '[Migration 000030] web_search_providers table created successfully'; END $$;
diff --git a/migrations/versioned/000031_add_asr_config.up.sql b/migrations/versioned/000031_add_asr_config.up.sql
index 2b43731e6..de7f7b8e2 100644
--- a/migrations/versioned/000031_add_asr_config.up.sql
+++ b/migrations/versioned/000031_add_asr_config.up.sql
@@ -1,10 +1,10 @@
--- Migration: 000025_add_asr_config
+-- Migration: 000031_add_asr_config
-- Description: Add asr_config column to knowledge_bases for ASR (Automatic Speech Recognition) configuration.
-- ASR config stores the model ID and language settings for audio transcription.
-DO $$ BEGIN RAISE NOTICE '[Migration 000025] Adding asr_config column to knowledge_bases'; END $$;
+DO $$ BEGIN RAISE NOTICE '[Migration 000031] Adding asr_config column to knowledge_bases'; END $$;
ALTER TABLE knowledge_bases ADD COLUMN IF NOT EXISTS asr_config JSONB;
COMMENT ON COLUMN knowledge_bases.asr_config IS 'ASR (Automatic Speech Recognition) configuration: {"enabled": bool, "model_id": string, "language": string}';
-DO $$ BEGIN RAISE NOTICE '[Migration 000025] asr_config column added successfully'; END $$;
+DO $$ BEGIN RAISE NOTICE '[Migration 000031] asr_config column added successfully'; END $$;