SurfSense/surfsense_backend/alembic/versions
CREDO23 91d947ff79 refactor(embedding-cache): rename index cache to embedding cache
The cached payload is the indexing pipeline's embeddings (markdown is
chunked then embedded), so "embedding cache" names the expensive output
directly and removes the "index" ambiguity (DB index vs vector index vs
indexing phase). Renames the service, settings, eligibility, eviction
task, metrics, config flags (INDEX_CACHE_* -> EMBEDDING_CACHE_*), object
prefix, and the table (index_cache_embedding_sets -> embedding_cache_sets)
with its constraint and indexes. Migration 161 renamed accordingly.
2026-06-12 17:00:01 +02:00
..
0_initial_schema.py feat: add migration 0 for initial schema setup 2026-01-14 17:04:37 +02:00
1_add_github_connector_enum.py chore: linting 2026-01-15 00:05:53 -08:00
2_add_linear_connector_enum.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
3_add_linear_connector_to_documenttype_.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
4_add_linkup_api_enum.py fix linkup enum migration file 2025-08-13 21:18:33 +02:00
5_remove_title_char_limit.py Make migration 5 idempotent 2026-01-13 20:12:58 +02:00
6_change_podcast_content_to_transcript.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
7_remove_is_generated_column.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
8_add_content_hash_to_documents.py fix migration version 8 2025-12-13 21:45:45 +02:00
9_add_discord_connector_enum_and_documenttype.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
10_update_chattype_enum_to_qna_report_structure.py chore: linting 2026-01-15 00:05:53 -08:00
11_add_llm_config_table_and_relationships.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
12_add_logs_table.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
13_add_jira_connector_enums.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00
14_add_confluence_connector_enums.py Add migration file 2025-07-26 14:46:23 +02:00
15_add_clickup_connector_enums.py fix ruff isues 2025-08-01 00:27:50 +02:00
16_fix_connector_unique_constraint.py fix(backend): modified unique constraint on search_source_connectors table 2025-08-02 11:47:49 -07:00
17_add_google_calendar_connector_enums.py add requested changes 2025-08-07 21:18:25 +02:00
18_add_google_gmail_connector_enums.py generate migration file 2025-08-15 09:11:14 +02:00
19_add_airtable_connector_enums.py Add airtable connector auth flow routes 2025-08-26 13:56:31 +02:00
20_add_openrouter_to_litellmprovider_enum.py Added OpenRouter to provider list 2025-09-16 18:26:58 -07:00
21_add_luma_connector_enums.py Added Luma connector 2025-09-28 14:59:10 -07:00
22_add_cometapi_to_litellmprovider_enum.py feat: Added CometAPI to LLM providers list 2025-10-04 15:13:03 +08:00
23_associate_connectors_with_search_spaces.py feat: added missed migration 2025-10-12 20:15:27 -07:00
24_fix_null_chat_types.py Make migration 24 idempotent 2026-01-13 20:13:08 +02:00
25_migrate_llm_configs_to_search_spaces.py feat: added periodic tasks in backend db and frontend hooks 2025-10-22 16:14:25 -07:00
26_add_language_column_to_llm_configs.py feat: added missed migration 2025-10-12 20:15:27 -07:00
27_add_searxng_connector_enum.py refactor: updated SearxNG connector migration and fixed validation for SearxNG host URL 2025-10-13 13:57:58 -07:00
28_add_chinese_litellmprovider_enum.py chore: removed chinese comments to pass ruff checks and updated migration nos 2025-10-13 20:07:32 -07:00
29_add_unique_identifier_hash_to_documents.py fix migration version 29 2025-12-13 21:46:39 +02:00
30_add_baidu_search_connector_enum.py feat: bumped version to v0.0.8 2025-10-16 22:44:12 -07:00
31_add_elasticsearch_connector_enums.py feat: update Elasticsearch integration and logging 2025-10-17 02:21:56 +05:30
32_add_periodic_indexing_fields.py feat: added periodic tasks in backend db and frontend hooks 2025-10-22 16:14:25 -07:00
33_add_page_limits_to_user.py feat: added file limit tracking for a user 2025-10-30 14:58:08 -07:00
34_add_podcast_staleness_detection.py Make migration 34 idempotent 2026-01-13 20:13:13 +02:00
35_update_litellmprovider_enum_comprehensive.py feat(llm): expand LLM provider options and improve model selection UI 2025-11-13 02:41:30 -08:00
36_remove_fk_constraints_for_global_llm_configs.py chore(lint): ruff checks 2025-11-26 13:22:31 -08:00
37_add_system_prompts_to_searchspaces.py fix(refactor): Alembic migrations 2025-11-26 13:22:01 -08:00
38_add_webcrawler_connector_enum.py Renaming resources 2025-11-22 19:19:00 -08:00
39_add_rbac_tables.py feat: Implement Role-Based Access Control (RBAC) for search space resources. 2025-11-27 22:45:04 -08:00
40_move_llm_preferences_to_searchspace.py fix migration version 40 | upgrade 2025-12-13 21:47:20 +02:00
41_backfill_rbac_for_existing_searchspaces.py ruff format 2025-11-29 00:16:41 -08:00
42_drop_user_search_space_preferences.py ruff format 2025-11-29 00:16:41 -08:00
43_add_blocknote_fields_to_documents.py fix migration version 43 | upgrade 2025-12-13 21:48:13 +02:00
44_add_bookstack_connector_enums.py fix: update migration id from 39 to 44 after syncing with upstream 2025-12-06 09:16:24 +08:00
45_add_updated_at_to_documents.py fix migration version 45 | upgrade 2025-12-13 21:48:54 +02:00
46_remove_last_edited_at_from_documents.py fix alembic version 46 2025-12-13 22:04:53 +02:00
47_copy_created_at_to_updated_at.py feat: implement time-based filtering for document retrieval using 'updated_at' timestamp 2025-12-12 02:42:20 -08:00
48_add_note_to_documenttype_enum.py fix: fixed linting for some files 2025-12-16 20:25:50 +05:30
49_migrate_old_chats_to_new_chat.py chore: linting 2026-01-15 00:05:53 -08:00
50_remove_podcast_chat_columns.py refactor: remove chat-related fields and legacy podcast generation function 2025-12-21 23:31:11 -08:00
51_add_new_llm_config_table.py style: simplify LLM model terminology in UI 2026-04-02 10:11:35 +05:30
52_rename_llm_preference_columns.py Make migration 52 idempotent 2026-01-13 20:13:30 +02:00
53_cleanup_old_llm_configs.py chore: ruff format 2025-12-23 02:56:13 -08:00
54_add_google_drive_connector_enums.py feat: added circleback connector 2025-12-30 09:00:59 -08:00
55_rename_google_drive_connector_to_file.py Make migration 55 idempotent 2026-01-13 20:13:50 +02:00
56_add_circleback_connector_enums.py chore: linting 2026-01-01 22:56:37 -08:00
57_allow_multiple_connectors_per_type.py chore: linting 2026-01-07 19:10:53 -08:00
58_unique_connector_name_per_space_user.py chore: linting 2026-01-07 19:10:53 -08:00
59_add_teams_connector_enums.py lint 2026-01-09 13:53:09 -08:00
60_add_surfsense_docs_tables.py chore: linting 2026-01-12 14:17:15 -08:00
61_add_chat_visibility_and_created_by.py feat: added shared chats 2026-01-13 00:17:12 -08:00
62_add_mcp_connector_type.py chore: linting 2026-01-15 00:05:53 -08:00
63_allow_multiple_connectors_with_unique_.py chore: linting 2026-01-15 00:05:53 -08:00
64_add_user_profile_columns.py fix: migrations 2026-01-14 15:19:00 -08:00
65_add_message_author_id.py refactor: remove read tracking from mentions (prep for notification center) 2026-01-16 19:15:10 +02:00
66_add_notifications_table_and_electric_replication.py chore: correct file path for Electric SQL user initialization script in Docker deployment documentation 2026-02-25 03:56:32 +05:30
67_add_pg_trgm_index_for_document_title_search.py chore: update redundant comments 2026-01-18 20:13:51 +05:30
68_add_chat_comments_table.py chore: resolve migration file conflicts 2026-01-19 17:10:11 +02:00
69_add_chat_comment_mentions_table.py chore: resolve migration file conflicts 2026-01-19 17:10:11 +02:00
70_add_comments_permissions_to_roles.py chore: resolve migration file conflicts 2026-01-19 17:10:11 +02:00
71_add_comments_electric_replication.py feat: add Electric SQL replication for chat_comment_mentions 2026-01-19 17:28:44 +02:00
72_simplify_rbac_roles.py refactor: bulk updating Admin to Editor roles 2026-01-20 03:11:49 -08:00
73_add_user_memories_table.py ruff 2026-01-21 09:47:17 -08:00
74_no_op.py refactor: remove unused COMPOSIO_CONNECTOR migration and linting 2026-01-22 16:43:08 -08:00
75_add_chat_session_state_table.py Merge upstream/dev with live collaboration features 2026-01-22 23:00:42 +02:00
76_add_live_collaboration_tables_electric_replication.py Merge upstream/dev with live collaboration features 2026-01-22 23:00:42 +02:00
77_add_thread_id_to_chat_comments.py refactor: remove unused COMPOSIO_CONNECTOR migration and linting 2026-01-22 16:43:08 -08:00
78_add_obsidian_connector.py add missing migration 2026-01-22 20:58:18 -08:00
79_add_composio_connector_enums.py Merge remote-tracking branch 'upstream/dev' into feat/composio 2026-01-23 14:35:17 +05:30
80_add_user_incentive_tasks_table.py feat: added incentive credits system 2026-01-26 23:32:30 -08:00
81_add_public_chat_features.py refactor(backend): two-phase synchronous cloning 2026-01-28 00:17:29 +02:00
82_add_podcast_status_and_thread.py fix(database): handle duplicate podcast_status type creation gracefully 2026-01-29 15:16:08 -05:00
83_add_reddit_follow_incentive_task.py chore: linting 2026-01-28 22:15:43 -08:00
84_migrate_global_llm_configs_to_auto_mode.py hotpatch(cloud): add llm load balancing 2026-01-29 15:28:31 -08:00
85_add_public_chat_snapshots_table.py chore: linting 2026-02-01 21:17:24 -08:00
86_add_document_created_by.py chore: linting 2026-02-03 13:32:11 -08:00
87_add_document_connector_id.py chore: ran linting 2026-02-03 01:43:38 +05:30
88_make_podcast_transcript_nullable.py feat(migrations): possible podcast fix on prod 2026-02-02 17:02:21 -08:00
89_make_podcast_file_location_nullable.py feat(migrations): make podcast file_location nullable 2026-02-02 17:56:47 -08:00
90_add_public_sharing_permissions_to_roles.py fix: renumber migration to avoid version conflict with upstream 2026-02-03 14:46:33 +02:00
91_add_discord_join_incentive_task.py feat: add new incentive task type for Discord 2026-02-03 22:32:39 -08:00
92_add_refresh_tokens_table.py Add refresh token auth routes and utilities 2026-02-05 17:29:50 +02:00
93_add_image_generations_table.py feat: add residential proxy configuration for web crawling and YouTube transcript fetching 2026-02-05 20:44:13 -08:00
94_add_access_token_to_image_generations.py refactor: change alelmbic migration number and made migrations idempotent 2026-02-06 12:32:55 +05:30
95_add_document_status_column.py refactor: change alelmbic migration number and made migrations idempotent 2026-02-06 12:32:55 +05:30
96_add_shared_memories_table.py Add shared_memories table (SUR-152) 2026-02-06 16:30:50 +02:00
97_add_github_models_to_litellmprovider_enum.py fix: migration no 2026-02-09 15:11:33 -08:00
98_add_user_id_to_llm_and_image_configs.py chore: remove migration script for adding user_id to new_llm_configs and image_generation_configs 2026-02-11 03:48:46 +05:30
99_add_reports_table.py chore: ran linting 2026-02-13 02:43:26 +05:30
100_add_report_group_id.py chore: ran linting 2026-02-13 02:43:26 +05:30
101_add_source_markdown_to_documents.py feat: update migration to skip blocknode conversion and update transaction handling in chat routes 2026-02-20 22:43:25 -08:00
102_add_enable_summary_to_connectors.py feat: added configable summary calculation and various improvements 2026-02-26 18:24:57 -08:00
103_add_last_login_to_user.py feat: add last_login column to user table and update user login tracking 2026-03-08 18:24:29 +05:30
104_add_notification_composite_indexes.py fix: make migration 104 idempotent with if_not_exists on index creation 2026-03-23 20:22:48 +02:00
105_add_chunks_document_id_index.py refactor: correct alembic migration no 2026-03-10 12:54:42 -07:00
106_add_minimax_to_litellmprovider_enum.py feat: complete MiniMax LLM provider integration 2026-03-13 07:27:47 +08:00
107_add_video_presentations_table.py feat: add folder management features including creation, deletion, and organization of documents within folders 2026-03-27 01:39:15 -07:00
108_cleanup_electric_sql_artifacts.py add migration to clean up Electric SQL artifacts 2026-03-24 17:19:07 +02:00
109_add_folders_table.py fix: make migration 109 idempotent 2026-04-01 11:12:21 +02:00
110_add_onedrive_connector_enums.py feat: implement Microsoft OneDrive connector with OAuth support and indexing capabilities 2026-03-28 14:31:25 +05:30
111_add_prompts_table.py chore: ran linting 2026-03-30 01:50:41 +05:30
112_add_dropbox_connector_enums.py feat: add Dropbox connector enums to database schema for enhanced integration 2026-03-30 21:56:50 +05:30
113_add_prompt_library_schema.py chore: linting 2026-03-31 14:45:46 -07:00
114_seed_default_prompts.py Merge upstream/dev, renumber migrations after dropbox 112 2026-03-31 22:43:14 +02:00
115_add_page_purchases_table.py feat: integrate Stripe for page purchases and reconciliation tasks 2026-03-31 18:39:45 -07:00
116_create_zero_publication.py chore(migration): update migration files to enforce new publication mutation pattern 2026-05-12 17:31:49 +05:30
117_optimize_zero_publication_column_lists.py chore(migration): update migration files to enforce new publication mutation pattern 2026-05-12 17:31:49 +05:30
118_add_local_folder_sync_and_versioning.py chore(migration): update migration files to enforce new publication mutation pattern 2026-05-12 17:31:49 +05:30
119_add_vision_llm_id_to_search_spaces.py fix merge conflicts 2026-04-04 09:39:20 +02:00
120_add_vision_llm_configs_table.py chore: ran linting 2026-04-08 05:20:03 +05:30
121_add_memory_md_columns.py Tidy alembic migration version scripts 2026-04-24 18:49:22 +02:00
122_migrate_and_drop_old_memory_tables.py chore: ran linting 2026-04-10 14:20:11 +05:30
123_add_enable_vision_llm_to_connectors.py fix: renumber vision_llm migration from 121 to 123 to resolve conflict with upstream 2026-04-11 11:02:44 +02:00
124_add_ai_file_sort_enabled.py feat: added ai file sorting 2026-04-14 01:43:30 -07:00
125_add_token_usage_table.py chore: ran linting 2026-04-14 21:52:26 +05:30
126_add_premium_token_quota.py feat: no login experience and prem tokens 2026-04-15 17:02:00 -07:00
127_add_report_content_type.py fix: alembic migration nos 2026-04-18 16:05:18 -07:00
128_seed_build_resume_prompt.py fix: alembic migration nos 2026-04-18 16:05:18 -07:00
129_obsidian_plugin_vault_identity.py chore: ran linting 2026-04-22 06:40:39 +05:30
130_add_agent_action_log.py fix: add checks for existing tables and indexes before creating them in alembic migrations for idempotency 2026-05-10 22:40:29 +05:30
131_add_document_revisions.py fix: add checks for existing tables and indexes before creating them in alembic migrations for idempotency 2026-05-10 22:40:29 +05:30
132_add_agent_permission_rules.py fix: add checks for existing tables and indexes before creating them in alembic migrations for idempotency 2026-05-10 22:40:29 +05:30
133_drop_documents_content_hash_unique.py chore: linting 2026-04-28 21:37:51 -07:00
134_relax_revision_fks.py feat: improved agent streaming 2026-04-29 07:20:31 -07:00
135_action_log_correlation_ids.py fix: add checks for existing tables and indexes before creating them in alembic migrations for idempotency 2026-05-10 22:40:29 +05:30
136_new_chat_message_turn_id.py fix: ensure idempotency in alembic migrations by checking for existing columns and indexes before creation 2026-05-10 22:45:26 +05:30
137_unique_reverse_of_in_action_log.py fix: add checks for existing tables and indexes before creating them in alembic migrations for idempotency 2026-05-10 22:40:29 +05:30
138_add_thread_auto_model_pinning_fields.py refactor(auto_model_pin): simplify thread-level pinning by removing unused fields and indexes 2026-05-01 19:32:42 +05:30
139_add_user_to_zero_publication.py chore(migration): update migration files to enforce new publication mutation pattern 2026-05-12 17:31:49 +05:30
140_premium_tokens_to_credit_micros.py chore(migration): update migration files to enforce new publication mutation pattern 2026-05-12 17:31:49 +05:30
141_unique_chat_message_turn_role.py fix: add checks for existing tables and indexes before creating them in alembic migrations for idempotency 2026-05-10 22:40:29 +05:30
142_token_usage_message_id_unique.py feat: moved chat persistance to Server Side 2026-05-04 03:06:15 -07:00
143_force_zero_publication_resync.py feat(docker): add ZERO_AUTO_RESET configuration for improved replication safety 2026-06-06 14:21:14 +05:30
144_add_automation_tables.py fix: make migration 144 idempotent 2026-06-01 20:11:25 +02:00
145_add_automations_permissions_to_roles.py feat(rbac): backfill automations permissions on existing roles 2026-05-27 15:37:25 +02:00
146_drop_surfsense_docs_tables.py refactor: remove search_surfsense_docs tool and related references 2026-05-28 22:35:14 -07:00
147_add_event_to_automation_trigger_type.py feat(automations): migrate automation_trigger_type enum to add event 2026-05-29 17:48:39 +02:00
148_add_automation_runs_to_zero_publication.py chore: linting 2026-06-09 00:42:26 -07:00
149_add_gateway_tables.py chore: linting 2026-06-09 00:42:26 -07:00
150_add_slack_gateway_platform.py chore: update migration number 2026-06-02 01:27:34 +05:30
151_add_discord_gateway_platform.py chore: update migration number 2026-06-02 01:27:34 +05:30
152_add_document_files.py chore: linting 2026-06-09 00:42:26 -07:00
153_restore_automation_runs_to_zero_publication.py chore: linting 2026-06-09 00:42:26 -07:00
154_remove_document_summary_llm.py chore: linting 2026-06-09 00:42:26 -07:00
155_reconcile_zero_publication.py feat(docker): add ZERO_AUTO_RESET configuration for improved replication safety 2026-06-06 14:21:14 +05:30
156_unify_credits_wallet.py feat: enhance credit management and user experience 2026-06-10 22:52:27 -07:00
157_add_auto_reload_columns.py feat: enhance credit management and user experience 2026-06-10 22:52:27 -07:00
158_evolve_podcasts_lifecycle.py feat(migration): evolve podcast lifecycle by detaching from zero_publication and updating column handling 2026-06-11 16:17:14 -07:00
159_publish_podcasts_to_zero.py Merge remote-tracking branch 'upstream/dev' into improvement-podcast-graph 2026-06-11 23:14:49 +02:00
160_add_etl_cache_parses.py feat(migration): add etl_cache_parses table 2026-06-12 11:23:50 +02:00
161_add_embedding_cache_sets.py refactor(embedding-cache): rename index cache to embedding cache 2026-06-12 17:00:01 +02:00
e55302644c51_add_github_connector_to_documenttype_.py Fixed formatting and linting post Jira connector PR 2025-07-25 10:52:34 -07:00