Skip to content

Commit

Permalink
add migration to match RC
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk committed Jan 21, 2025
1 parent 7c92e08 commit 0b13b14
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions persistence/src/commonMain/db_user/migrations/96.sqm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import com.wire.kalium.persistence.dao.QualifiedIDEntity;
import com.wire.kalium.persistence.dao.conversation.folder.ConversationFolderTypeEntity;

CREATE TABLE IF NOT EXISTS ConversationFolder (
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
folder_type TEXT AS ConversationFolderTypeEntity NOT NULL
);


CREATE TABLE IF NOT EXISTS LabeledConversation (
conversation_id TEXT AS QualifiedIDEntity NOT NULL,
folder_id TEXT NOT NULL,

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 (folder_id, conversation_id)
);

0 comments on commit 0b13b14

Please sign in to comment.