fix: add folder_id and sort_order to AIChatSession model, fix UUID conversion in routes, add migration 0003
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
-- Migration 0003: Add sort_order columns for drag&drop reordering
|
||||
|
||||
ALTER TABLE ai_chat_sessions ADD COLUMN IF NOT EXISTS sort_order INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ai_chat_folders ADD COLUMN IF NOT EXISTS sort_order INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS ix_ai_sessions_folder ON ai_chat_sessions(folder_id);
|
||||
CREATE INDEX IF NOT EXISTS ix_ai_sessions_sort ON ai_chat_sessions(sort_order);
|
||||
CREATE INDEX IF NOT EXISTS ix_ai_folders_sort ON ai_chat_folders(sort_order);
|
||||
Reference in New Issue
Block a user