Skip to content

Commit

Permalink
fix: primary key of conversation folder (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garzas authored Nov 15, 2024
1 parent d140d79 commit eb66288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CREATE TABLE LabeledConversation (
FOREIGN KEY (conversation_id) REFERENCES Conversation(qualified_id) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (folder_id) REFERENCES ConversationFolder(id) ON DELETE CASCADE ON UPDATE CASCADE,

PRIMARY KEY (conversation_id, folder_id)
PRIMARY KEY (folder_id, conversation_id)
);

getConversationsFromFolder:
Expand Down
2 changes: 1 addition & 1 deletion persistence/src/commonMain/db_user/migrations/91.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ CREATE TABLE LabeledConversation (
FOREIGN KEY (conversation_id) REFERENCES Conversation(qualified_id) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (folder_id) REFERENCES ConversationFolder(id) ON DELETE CASCADE ON UPDATE CASCADE,

PRIMARY KEY (conversation_id, folder_id)
PRIMARY KEY (folder_id, conversation_id)
);

0 comments on commit eb66288

Please sign in to comment.