Skip to content

Commit

Permalink
drop instead of move labeled conversations
Browse files Browse the repository at this point in the history
  • Loading branch information
Garzas committed Jan 15, 2025
1 parent efb082b commit e747f56
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions persistence/src/commonMain/db_user/migrations/96.sqm
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
CREATE TABLE LabeledConversation_New (
DROP TABLE LabeledConversation;

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

FOREIGN KEY (folder_id) REFERENCES ConversationFolder(id) ON DELETE CASCADE ON UPDATE CASCADE,

PRIMARY KEY (folder_id, conversation_id)
);

INSERT INTO LabeledConversation_New (conversation_id, folder_id)
SELECT conversation_id, folder_id FROM LabeledConversation;

DROP TABLE LabeledConversation;

ALTER TABLE LabeledConversation_New RENAME TO LabeledConversation;

0 comments on commit e747f56

Please sign in to comment.