Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong migrations order between 4.9 and 4.10 [WPB-15157] 🍒 #3240

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions persistence/src/commonMain/db_user/migrations/96.sqm
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
<<<<<<< HEAD
DROP TABLE LabeledConversation;

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

=======
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,
>>>>>>> 55e6c38055 (fix: wrong migrations order between 4.9 and 4.10 [WPB-15157] (#3238))
FOREIGN KEY (folder_id) REFERENCES ConversationFolder(id) ON DELETE CASCADE ON UPDATE CASCADE,

PRIMARY KEY (folder_id, conversation_id)
Expand Down