open-webui/backend/open_webui/migrations/versions
Classic298 460bf0e42b
fix: database upgrade breaks the reply chain of old chats whose first message has no id (#35012)
In a chat from an older version whose saved message list is broken, the upgrade falls back to the older plain list of its messages. When that list's first entry has no id but is already saved, the message after it kept pointing at a first message that does not exist, so the conversation could not be followed back to its start. The next message now points at the saved first message.

Fixes #35004
2026-11-25 03:45:53 +04:00
..
0bd252b206fb_add_missing_auth_rows.py refac 2026-10-14 18:49:51 +04:00
1af9b942657b_migrate_tags.py refac 2026-05-14 13:46:08 +09:00
1ce6ade7d93b_add_group_member_user_id_index.py perf: index group_member on (user_id, group_id) (#27822) 2026-07-31 19:09:15 -05:00
2f1211949ecc_update_message_and_channel_member_table.py refac 2026-05-14 13:49:15 +09:00
3ab32c4b8f59_update_tags.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
3af16a1c9fb6_update_user_table.py refac 2026-05-14 13:46:36 +09:00
3c9b0ca343fd_add_knowledge_directory_table.py chore: format 2026-06-01 13:56:55 -07:00
3e0e00844bb0_add_knowledge_file_table.py refac 2026-05-14 13:46:36 +09:00
3ff2c63645b8_reshape_config_to_per_key_rows.py refac 2026-06-29 13:03:14 -05:00
4ace53fd72c8_update_folder_table_datetime.py refac 2026-05-14 14:12:42 +09:00
4c5ce3d2f27f_add_context_summary_to_chat_message.py refac 2026-06-19 00:16:06 +02:00
4de81c2a3af1_add_pinned_note_table.py chore: format 2026-06-01 13:56:55 -07:00
5e7a2c9d4b13_move_chat_history_to_chat_message.py fix: database upgrade breaks the reply chain of old chats whose first message has no id (#35012) 2026-11-25 03:45:53 +04:00
6a23bd107e54_add_chat_view_state.py refac 2026-11-07 20:31:42 +09:00
6a39f3d8e55c_add_knowledge_table.py refac 2026-05-14 14:05:28 +09:00
6d09d1bf1f23_repair_double_encoded_user_oauth.py chore: format 2026-08-25 16:53:53 -04:00
6f8c2a91d4e7_add_tool_is_active.py refac 2026-10-30 16:01:47 +09:00
7b3f2a9c1d4e_add_memory_type.py refac 2026-06-29 00:21:37 -05:00
7e5b5dc7342b_init.py refac 2026-11-02 08:48:51 +09:00
8bc7e5a902d1_add_auth_session.py refac 2026-11-05 11:41:25 +09:00
9a1b2c3d4e5f_add_current_message_id_to_chat.py chore: format 2026-07-23 13:41:16 -04:00
9f0c9cd09105_add_note_table.py refac 2026-05-14 13:45:39 +09:00
9f6c2a8d1b43_add_channel_lookup_indexes.py refac 2026-11-08 11:52:13 +09:00
37f288994c47_add_group_member_table.py refac 2026-05-14 13:46:23 +09:00
38d63c18f30f_add_oauth_session_table.py refac 2026-11-02 08:48:51 +09:00
42e2978c7933_add_memory_path_and_meta.py refac 2026-06-29 05:49:49 -05:00
55f1302ac17c_add_memory_id_user_id_covering_index.py refac 2026-07-24 01:54:36 -04:00
57c599a3cb57_add_channel_table.py refac 2026-05-14 13:49:50 +09:00
81cc2ce44d79_update_channel_file_and_knowledge_table.py refac 2026-05-14 13:45:59 +09:00
90ef40d4714e_update_channel_and_channel_members_table.py refac 2026-05-14 13:45:59 +09:00
242a2047eae0_update_chat_table.py refac 2026-06-29 11:59:50 -05:00
374d2f66af06_add_prompt_history_table.py refac 2026-05-14 14:06:32 +09:00
856c5b02fb54_add_chat_message_meta.py refac 2026-07-16 01:42:24 -04:00
922e7a387820_add_group_table.py refac 2026-05-14 13:45:39 +09:00
959eaac8f909_add_automation_folder_id.py chore: format 2026-07-27 00:12:47 -04:00
3781e22d8b01_update_message_table.py chore: format 2026-06-01 13:56:55 -07:00
6283dc0e4d8d_add_channel_file_table.py chore: format 2026-06-01 13:56:55 -07:00
7826ab40b532_update_file_table.py refac 2026-05-14 13:46:54 +09:00
8452d01d26d7_add_chat_message_table.py refac 2026-05-14 13:46:54 +09:00
461111b60977_add_missing_primary_keys_to_legacy_.py chore: format 2026-06-01 13:56:55 -07:00
018012973d35_add_indexes.py refac 2026-05-14 14:06:32 +09:00
56359461a091_add_calendar_tables.py chore: format 2026-06-01 13:56:55 -07:00
a0b1c2d3e4f5_add_memory_user_id_index.py refac 2026-05-14 13:45:31 +09:00
a1b2c3d4e5f6_add_skill_table.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
a3dd5bedd151_add_tasks_and_summary_to_chat.py refac 2026-05-14 03:06:37 +09:00
a5c220713937_add_reply_to_id_column_to_message.py refac 2026-05-14 13:45:31 +09:00
a7d3e9f2b641_add_mfa_and_session_stamp.py refac 2026-10-05 12:17:25 +04:00
af906e964978_add_feedback_table.py refac 2026-11-02 08:48:51 +09:00
b2c3d4e5f6a7_add_scim_column_to_user_table.py refac 2026-05-14 13:45:21 +09:00
b7c8d9e0f1a2_add_last_read_at_to_chat.py refac 2026-05-14 03:06:37 +09:00
b7d4f1a2c960_add_resource_tag.py refac 2026-11-23 16:10:09 +04:00
b8e4f0a3c752_add_group_hierarchy.py refac 2026-10-05 14:01:02 +04:00
b8f2c6d91a04_add_postgres_pending_files_index.py refac 2026-10-10 23:15:08 +04:00
b10670c03dd5_update_user_table.py refac 2026-11-02 08:48:51 +09:00
b0018471bbbe_add_user_variables.py chore: format 2026-07-27 00:12:47 -04:00
c0fbf31ca0db_update_file_table.py refac 2026-11-02 08:48:51 +09:00
c1d2e3f4a5b6_add_shared_chat_table.py chore: format 2026-06-01 13:56:55 -07:00
c4e1a7d93b20_rename_terminal_grants_to_machine.py refac 2026-11-22 17:13:34 +04:00
c29facfe716b_update_file_table_path.py refac 2026-05-14 13:45:12 +09:00
c41f8d9e2a10_add_resource_comments.py refac 2026-10-30 16:01:47 +09:00
c69f45358db4_add_folder_table.py refac 2026-05-14 13:45:05 +09:00
c92da83b017f_add_apps.py refac 2026-10-12 17:29:04 +04:00
c49178636c78_add_chat_variables.py chore: format 2026-07-27 00:12:47 -04:00
c440947495f3_add_chat_file_table.py refac 2026-05-14 13:45:05 +09:00
ca81bd47c050_add_config_table.py refac 2026-05-14 13:44:50 +09:00
d2f86c0b41ae_add_folder_view_state.py refac 2026-11-24 22:11:32 +04:00
d4c1a8e37b62_add_chat_timer_at_and_chat_indexes.py fix: index the chat queries that make large SQLite instances unusable (#27663) 2026-08-23 16:11:54 -05:00
d4e5f6a7b8c9_add_automation_tables.py refac 2026-05-14 14:12:42 +09:00
d6a8c3f912ab_add_skill_history.py refac 2026-10-09 15:07:43 +04:00
d31026856c01_update_folder_table_data.py refac 2026-05-14 13:44:50 +09:00
e1f2a3b4c5d6_add_is_pinned_to_note.py refac 2026-05-14 03:06:37 +09:00
e7b9d4a023bc_add_model_history.py refac 2026-10-09 17:01:47 +04:00
e42c8f710a36_add_notification_inbox.py refac 2026-10-31 16:50:01 +09:00
f0bd01a18a3d_add_unique_normalized_user_email_index.py chore: format 2026-07-27 04:46:45 -04:00
f1e2d3c4b5a6_add_access_grant_table.py refac 2026-05-14 14:05:28 +09:00
f8c0e5b134cd_add_tool_history_and_function_history.py refac 2026-10-09 18:37:55 +04:00