From 48c3ad227e646c41f8d4462378c54b8d195b9c37 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:17:48 +0000 Subject: [PATCH] chore(sqlite): replace double-quoted literals with single-quoted ones (#2420) (#2425) Co-authored-by: Vitor Hugo Schwaab Co-authored-by: Yamil Medina --- .../com/wire/kalium/persistence/Clients.sq | 6 ++--- .../wire/kalium/persistence/Conversations.sq | 24 +++++++++---------- .../com/wire/kalium/persistence/Members.sq | 8 +++---- .../kalium/persistence/MessageDetailsView.sq | 2 +- .../com/wire/kalium/persistence/Users.sq | 6 ++--- .../src/commonMain/db_user/migrations/54.sqm | 2 +- .../src/commonMain/db_user/migrations/55.sqm | 2 +- .../src/commonMain/db_user/migrations/58.sqm | 2 +- .../src/commonMain/db_user/migrations/62.sqm | 2 +- .../src/commonMain/db_user/migrations/63.sqm | 16 ++++++------- .../src/commonMain/db_user/migrations/64.sqm | 22 ++++++++--------- .../src/commonMain/db_user/migrations/65.sqm | 12 +++++----- .../src/commonMain/db_user/migrations/66.sqm | 2 +- .../src/commonMain/db_user/migrations/70.sqm | 2 +- .../src/commonMain/db_user/migrations/73.sqm | 2 +- 15 files changed, 55 insertions(+), 55 deletions(-) diff --git a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Clients.sq b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Clients.sq index c0663b6a380..3458e5b4b8e 100644 --- a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Clients.sq +++ b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Clients.sq @@ -92,7 +92,7 @@ SELECT * CREATE TRIGGER updateConversationProteusVerificationStatus AFTER UPDATE ON Client BEGIN - UPDATE Conversation SET proteus_verification_status = (CASE (new.is_verified) WHEN 1 THEN "VERIFIED" ELSE "DEGRADED" END) + UPDATE Conversation SET proteus_verification_status = (CASE (new.is_verified) WHEN 1 THEN 'VERIFIED' ELSE 'DEGRADED' END) WHERE qualified_id IN ( SELECT id FROM (SELECT conv.qualified_id AS id, @@ -106,14 +106,14 @@ BEGIN LEFT JOIN Client ON Client.user_id = Member.user WHERE Client.id = new.id) GROUP BY conv.qualified_id) - WHERE (CASE (verificationStatus) WHEN "VERIFIED" THEN 1 ELSE 0 END) != isActuallyVerified + WHERE (CASE (verificationStatus) WHEN 'VERIFIED' THEN 1 ELSE 0 END) != isActuallyVerified ); END; CREATE TRIGGER updateConversationProteusVerificationStatusAfterNewClient AFTER INSERT ON Client BEGIN - UPDATE Conversation SET proteus_verification_status = "DEGRADED" + UPDATE Conversation SET proteus_verification_status = 'DEGRADED' WHERE qualified_id IN ( SELECT Member.conversation FROM Member LEFT JOIN Client ON Client.user_id = Member.user diff --git a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq index 09bee78567a..4a0483c62fa 100644 --- a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq +++ b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq @@ -41,10 +41,10 @@ CREATE TABLE Conversation ( archived INTEGER AS Boolean NOT NULL DEFAULT 0, archived_date_time INTEGER AS Instant, -- mls_verification_status - verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT "NOT_VERIFIED", - proteus_verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT "NOT_VERIFIED", + verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT 'NOT_VERIFIED', + proteus_verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT 'NOT_VERIFIED', degraded_conversation_notified INTEGER AS Boolean NOT NULL DEFAULT 1, - legal_hold_status TEXT AS ConversationEntity.LegalHoldStatus NOT NULL DEFAULT "DISABLED" + legal_hold_status TEXT AS ConversationEntity.LegalHoldStatus NOT NULL DEFAULT 'DISABLED' ); CREATE TABLE ConversationLegalHoldStatusChangeNotified ( @@ -304,7 +304,7 @@ selectByGroupId: SELECT * FROM ConversationDetails WHERE mls_group_id = ?; selectByGroupState: -SELECT * FROM ConversationDetails WHERE mls_group_state = ? AND (protocol IS "MLS" OR protocol IS "MIXED"); +SELECT * FROM ConversationDetails WHERE mls_group_state = ? AND (protocol IS 'MLS' OR protocol IS 'MIXED'); selectActiveOneOnOneConversation: SELECT * FROM ConversationDetails @@ -338,7 +338,7 @@ updateKeyingMaterialDate: UPDATE Conversation SET mls_last_keying_material_update_date= ? WHERE mls_group_id = ?; selectByKeyingMaterialUpdate: -SELECT mls_group_id FROM Conversation WHERE mls_group_state = ? AND (protocol IS "MLS" OR protocol IS "MIXED") AND mls_last_keying_material_update_date - ? <0 AND mls_group_id IS NOT NULL; +SELECT mls_group_id FROM Conversation WHERE mls_group_state = ? AND (protocol IS 'MLS' OR protocol IS 'MIXED') AND mls_last_keying_material_update_date - ? <0 AND mls_group_id IS NOT NULL; updateProposalTimer: UPDATE Conversation SET mls_proposal_timer = COALESCE(mls_proposal_timer, ?) WHERE mls_group_id = ?; @@ -347,7 +347,7 @@ clearProposalTimer: UPDATE Conversation SET mls_proposal_timer = NULL WHERE mls_group_id = ?; selectProposalTimers: -SELECT mls_group_id, mls_proposal_timer FROM Conversation WHERE (protocol IS "MLS" OR protocol IS "MIXED") AND mls_group_id IS NOT NULL AND mls_proposal_timer IS NOT NULL; +SELECT mls_group_id, mls_proposal_timer FROM Conversation WHERE (protocol IS 'MLS' OR protocol IS 'MIXED') AND mls_group_id IS NOT NULL AND mls_proposal_timer IS NOT NULL; whoDeletedMeInConversation: SELECT sender_user_id FROM Message WHERE id IN (SELECT message_id FROM MessageMemberChangeContent WHERE conversation_id = :conversation_id AND member_change_type = 'REMOVED' AND member_change_list LIKE ('%' || :self_user_id || '%')) ORDER BY creation_date DESC LIMIT 1; @@ -464,7 +464,7 @@ SELECT changes(); CREATE TRIGGER addMessageAfterProteusVerificationStatusChange AFTER UPDATE ON Conversation WHEN new.proteus_verification_status != old.proteus_verification_status -AND (new.proteus_verification_status = "VERIFIED" OR old.proteus_verification_status = "VERIFIED") +AND (new.proteus_verification_status = 'VERIFIED' OR old.proteus_verification_status = 'VERIFIED') BEGIN INSERT OR IGNORE INTO Message(id, content_type, conversation_id, creation_date, sender_user_id, sender_client_id, status, visibility) VALUES( @@ -472,18 +472,18 @@ BEGIN substr(lower(hex(randomblob(2))),2) || '-a' || substr(lower(hex(randomblob(2))),2) || '-' || lower(hex(randomblob(6))))), (CASE (new.proteus_verification_status) - WHEN "VERIFIED" THEN "CONVERSATION_VERIFIED_PROTEUS" - ELSE "CONVERSATION_DEGRADED_PROTEUS" END + WHEN 'VERIFIED' THEN 'CONVERSATION_VERIFIED_PROTEUS' + ELSE 'CONVERSATION_DEGRADED_PROTEUS' END ), new.qualified_id, (SELECT CAST((julianday('now') - 2440587.5) * 86400 * 1000 AS INTEGER)), (SELECT SelfUser.id FROM SelfUser LIMIT 1), (SELECT Client.id FROM Client WHERE Client.user_id = (SELECT SelfUser.id FROM SelfUser LIMIT 1) LIMIT 1), - "SENT", - "VISIBLE" + 'SENT', + 'VISIBLE' ); UPDATE Conversation - SET degraded_conversation_notified = (new.proteus_verification_status != "DEGRADED") + SET degraded_conversation_notified = (new.proteus_verification_status != 'DEGRADED') WHERE qualified_id = new.qualified_id; END; diff --git a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Members.sq b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Members.sq index 9c845a56629..ffa70769913 100644 --- a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Members.sq +++ b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Members.sq @@ -97,8 +97,8 @@ BEGIN LEFT JOIN Client AS client ON client.user_id = mem.user WHERE mem.conversation = new.conversation GROUP BY mem.conversation) - WHEN 1 THEN "VERIFIED" - ELSE "DEGRADED" END) + WHEN 1 THEN 'VERIFIED' + ELSE 'DEGRADED' END) WHERE qualified_id = new.conversation; END; @@ -113,8 +113,8 @@ BEGIN LEFT JOIN Client AS client ON client.user_id = mem.user WHERE mem.conversation = old.conversation GROUP BY mem.conversation) - WHEN 1 THEN "VERIFIED" - ELSE "DEGRADED" END) + WHEN 1 THEN 'VERIFIED' + ELSE 'DEGRADED' END) WHERE qualified_id = old.conversation; END; diff --git a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessageDetailsView.sq b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessageDetailsView.sq index e606319529c..f4aec744e68 100644 --- a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessageDetailsView.sq +++ b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessageDetailsView.sq @@ -25,7 +25,7 @@ Message.expects_read_confirmation AS expectsReadConfirmation, Message.expire_after_millis AS expireAfterMillis, Message.self_deletion_start_date AS selfDeletionStartDate, Message.self_deletion_end_date AS selfDeletionEndDate, -IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = "READ"), 0) AS readCount, +IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = 'READ'), 0) AS readCount, User.name AS senderName, User.handle AS senderHandle, User.email AS senderEmail, diff --git a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Users.sq b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Users.sq index 6f86c550cfe..c9fbd25b8ea 100644 --- a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Users.sq +++ b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Users.sq @@ -211,20 +211,20 @@ WHERE NOT EXISTS (SELECT user FROM Member AS member WHERE member.conversation == AND (name LIKE ('%' || :searchQuery || '%') OR handle LIKE ('%' || :searchQuery || '%') OR email LIKE ('%' || :searchQuery || '%')) -AND connection_status = "ACCEPTED" +AND connection_status = 'ACCEPTED' AND defederated = 0; getUsersNotInConversationByHandle: SELECT * FROM UserDetails AS user WHERE NOT EXISTS (SELECT user FROM Member AS member WHERE member.conversation == :converastion_id AND user.qualified_id == member.user) AND handle LIKE ('%' || :searchQuery || '%') -AND connection_status = "ACCEPTED" +AND connection_status = 'ACCEPTED' AND defederated = 0; getUsersNotPartOfTheConversation: SELECT * FROM UserDetails AS user WHERE NOT EXISTS (SELECT user FROM Member AS member WHERE member.conversation == :converastion_id AND user.qualified_id == member.user) - AND connection_status = "ACCEPTED" + AND connection_status = 'ACCEPTED' AND defederated = 0; updateUserDisplayName: diff --git a/persistence/src/commonMain/db_user/migrations/54.sqm b/persistence/src/commonMain/db_user/migrations/54.sqm index 36e13c3e6e6..a0244e5ab42 100644 --- a/persistence/src/commonMain/db_user/migrations/54.sqm +++ b/persistence/src/commonMain/db_user/migrations/54.sqm @@ -25,7 +25,7 @@ Message.visibility AS visibility, Message.expects_read_confirmation AS expectsReadConfirmation, Message.expire_after_millis AS expireAfterMillis, Message.self_deletion_start_date AS selfDeletionStartDate, -IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = "READ"), 0) AS readCount, +IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = 'READ'), 0) AS readCount, User.name AS senderName, User.handle AS senderHandle, User.email AS senderEmail, diff --git a/persistence/src/commonMain/db_user/migrations/55.sqm b/persistence/src/commonMain/db_user/migrations/55.sqm index 1d904dc411d..c5f40ab5936 100644 --- a/persistence/src/commonMain/db_user/migrations/55.sqm +++ b/persistence/src/commonMain/db_user/migrations/55.sqm @@ -120,7 +120,7 @@ Message.visibility AS visibility, Message.expects_read_confirmation AS expectsReadConfirmation, Message.expire_after_millis AS expireAfterMillis, Message.self_deletion_start_date AS selfDeletionStartDate, -IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = "READ"), 0) AS readCount, +IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = 'READ'), 0) AS readCount, User.name AS senderName, User.handle AS senderHandle, User.email AS senderEmail, diff --git a/persistence/src/commonMain/db_user/migrations/58.sqm b/persistence/src/commonMain/db_user/migrations/58.sqm index 3fc1354030e..c4a11314527 100644 --- a/persistence/src/commonMain/db_user/migrations/58.sqm +++ b/persistence/src/commonMain/db_user/migrations/58.sqm @@ -1,6 +1,6 @@ import com.wire.kalium.persistence.dao.conversation.ConversationEntity; -ALTER TABLE Conversation ADD COLUMN verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT "NOT_VERIFIED" ; +ALTER TABLE Conversation ADD COLUMN verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT 'NOT_VERIFIED' ; DROP VIEW IF EXISTS ConversationDetails; diff --git a/persistence/src/commonMain/db_user/migrations/62.sqm b/persistence/src/commonMain/db_user/migrations/62.sqm index 577c3035d09..c961994c07d 100644 --- a/persistence/src/commonMain/db_user/migrations/62.sqm +++ b/persistence/src/commonMain/db_user/migrations/62.sqm @@ -26,7 +26,7 @@ Message.visibility AS visibility, Message.expects_read_confirmation AS expectsReadConfirmation, Message.expire_after_millis AS expireAfterMillis, Message.self_deletion_start_date AS selfDeletionStartDate, -IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = "READ"), 0) AS readCount, +IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = 'READ'), 0) AS readCount, User.name AS senderName, User.handle AS senderHandle, User.email AS senderEmail, diff --git a/persistence/src/commonMain/db_user/migrations/63.sqm b/persistence/src/commonMain/db_user/migrations/63.sqm index f7c80c0b1a5..ab35252b16d 100644 --- a/persistence/src/commonMain/db_user/migrations/63.sqm +++ b/persistence/src/commonMain/db_user/migrations/63.sqm @@ -1,6 +1,6 @@ import com.wire.kalium.persistence.dao.conversation.ConversationEntity; -ALTER TABLE Conversation ADD COLUMN proteus_verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT "NOT_VERIFIED"; +ALTER TABLE Conversation ADD COLUMN proteus_verification_status TEXT AS ConversationEntity.VerificationStatus NOT NULL DEFAULT 'NOT_VERIFIED'; DROP VIEW IF EXISTS ConversationDetails; @@ -113,7 +113,7 @@ LEFT JOIN Call ON Call.id IS (SELECT id FROM Call WHERE Call.conversation_id = C CREATE TRIGGER updateConversationProteusVerificationStatus AFTER UPDATE ON Client BEGIN - UPDATE Conversation SET proteus_verification_status = (CASE (new.is_verified) WHEN 1 THEN "VERIFIED" ELSE "DEGRADED" END) + UPDATE Conversation SET proteus_verification_status = (CASE (new.is_verified) WHEN 1 THEN 'VERIFIED' ELSE 'DEGRADED' END) WHERE qualified_id IN ( SELECT id FROM (SELECT conv.qualified_id AS id, conv.proteus_verification_status AS verificationStatus, (COUNT(*) = SUM(CASE WHEN client.is_verified = 1 THEN 1 ELSE 0 END)) AS isActuallyVerified FROM Conversation AS conv @@ -124,14 +124,14 @@ BEGIN WHERE Client.id = new.id) AND mem.user IS NOT (SELECT SelfUser.id FROM SelfUser LIMIT 1) GROUP BY conv.qualified_id) - WHERE (CASE (verificationStatus) WHEN "VERIFIED" THEN 1 ELSE 0 END) != isActuallyVerified + WHERE (CASE (verificationStatus) WHEN 'VERIFIED' THEN 1 ELSE 0 END) != isActuallyVerified ); END; CREATE TRIGGER updateConversationProteusVerificationStatusAfterNewClient AFTER INSERT ON Client BEGIN - UPDATE Conversation SET proteus_verification_status = "DEGRADED" + UPDATE Conversation SET proteus_verification_status = 'DEGRADED' WHERE qualified_id IN ( SELECT Member.conversation FROM Member LEFT JOIN Client ON Client.user_id = Member.user @@ -149,14 +149,14 @@ BEGIN substr(lower(hex(randomblob(2))),2) || '-a' || substr(lower(hex(randomblob(2))),2) || '-' || lower(hex(randomblob(6))))), (CASE (new.proteus_verification_status) - WHEN "VERIFIED" THEN "CONVERSATION_VERIFIED_PROTEUS" - ELSE "CONVERSATION_DEGRADED_PROTEUS" END + WHEN 'VERIFIED' THEN 'CONVERSATION_VERIFIED_PROTEUS' + ELSE 'CONVERSATION_DEGRADED_PROTEUS' END ), new.qualified_id, (SELECT CAST((julianday('now') - 2440587.5) * 86400 * 1000 AS INTEGER)), (SELECT SelfUser.id FROM SelfUser LIMIT 1), (SELECT Client.id FROM Client WHERE Client.user_id = (SELECT SelfUser.id FROM SelfUser LIMIT 1) LIMIT 1), - "SENT", - "VISIBLE" + 'SENT', + 'VISIBLE' ); END; diff --git a/persistence/src/commonMain/db_user/migrations/64.sqm b/persistence/src/commonMain/db_user/migrations/64.sqm index a936a9e9160..ce27caa83f4 100644 --- a/persistence/src/commonMain/db_user/migrations/64.sqm +++ b/persistence/src/commonMain/db_user/migrations/64.sqm @@ -4,7 +4,7 @@ DROP TRIGGER IF EXISTS addMessageAfterProteusVerificationStatusChange; CREATE TRIGGER updateConversationProteusVerificationStatus AFTER UPDATE ON Client BEGIN - UPDATE Conversation SET proteus_verification_status = (CASE (new.is_verified) WHEN 1 THEN "VERIFIED" ELSE "DEGRADED" END) + UPDATE Conversation SET proteus_verification_status = (CASE (new.is_verified) WHEN 1 THEN 'VERIFIED' ELSE 'DEGRADED' END) WHERE qualified_id IN ( SELECT id FROM (SELECT conv.qualified_id AS id, @@ -18,14 +18,14 @@ BEGIN LEFT JOIN Client ON Client.user_id = Member.user WHERE Client.id = new.id) GROUP BY conv.qualified_id) - WHERE (CASE (verificationStatus) WHEN "VERIFIED" THEN 1 ELSE 0 END) != isActuallyVerified + WHERE (CASE (verificationStatus) WHEN 'VERIFIED' THEN 1 ELSE 0 END) != isActuallyVerified ); END; CREATE TRIGGER addMessageAfterProteusVerificationStatusChange AFTER UPDATE ON Conversation WHEN new.proteus_verification_status != old.proteus_verification_status -AND (new.proteus_verification_status = "VERIFIED" OR old.proteus_verification_status = "VERIFIED") +AND (new.proteus_verification_status = 'VERIFIED' OR old.proteus_verification_status = 'VERIFIED') BEGIN INSERT OR IGNORE INTO Message(id, content_type, conversation_id, creation_date, sender_user_id, sender_client_id, status, visibility) VALUES( @@ -33,15 +33,15 @@ BEGIN substr(lower(hex(randomblob(2))),2) || '-a' || substr(lower(hex(randomblob(2))),2) || '-' || lower(hex(randomblob(6))))), (CASE (new.proteus_verification_status) - WHEN "VERIFIED" THEN "CONVERSATION_VERIFIED_PROTEUS" - ELSE "CONVERSATION_DEGRADED_PROTEUS" END + WHEN 'VERIFIED' THEN 'CONVERSATION_VERIFIED_PROTEUS' + ELSE 'CONVERSATION_DEGRADED_PROTEUS' END ), new.qualified_id, (SELECT CAST((julianday('now') - 2440587.5) * 86400 * 1000 AS INTEGER)), (SELECT SelfUser.id FROM SelfUser LIMIT 1), (SELECT Client.id FROM Client WHERE Client.user_id = (SELECT SelfUser.id FROM SelfUser LIMIT 1) LIMIT 1), - "SENT", - "VISIBLE" + 'SENT', + 'VISIBLE' ); END; @@ -56,8 +56,8 @@ BEGIN LEFT JOIN Client AS client ON client.user_id = mem.user WHERE mem.conversation = new.conversation GROUP BY mem.conversation) - WHEN 1 THEN "VERIFIED" - ELSE "DEGRADED" END) + WHEN 1 THEN 'VERIFIED' + ELSE 'DEGRADED' END) WHERE qualified_id = new.conversation; END; @@ -72,7 +72,7 @@ BEGIN LEFT JOIN Client AS client ON client.user_id = mem.user WHERE mem.conversation = old.conversation GROUP BY mem.conversation) - WHEN 1 THEN "VERIFIED" - ELSE "DEGRADED" END) + WHEN 1 THEN 'VERIFIED' + ELSE 'DEGRADED' END) WHERE qualified_id = old.conversation; END; diff --git a/persistence/src/commonMain/db_user/migrations/65.sqm b/persistence/src/commonMain/db_user/migrations/65.sqm index 8f81d670470..4273ffa379c 100644 --- a/persistence/src/commonMain/db_user/migrations/65.sqm +++ b/persistence/src/commonMain/db_user/migrations/65.sqm @@ -8,7 +8,7 @@ DROP TRIGGER IF EXISTS addMessageAfterProteusVerificationStatusChange; CREATE TRIGGER addMessageAfterProteusVerificationStatusChange AFTER UPDATE ON Conversation WHEN new.proteus_verification_status != old.proteus_verification_status -AND (new.proteus_verification_status = "VERIFIED" OR old.proteus_verification_status = "VERIFIED") +AND (new.proteus_verification_status = 'VERIFIED' OR old.proteus_verification_status = 'VERIFIED') BEGIN INSERT OR IGNORE INTO Message(id, content_type, conversation_id, creation_date, sender_user_id, sender_client_id, status, visibility) VALUES( @@ -16,18 +16,18 @@ BEGIN substr(lower(hex(randomblob(2))),2) || '-a' || substr(lower(hex(randomblob(2))),2) || '-' || lower(hex(randomblob(6))))), (CASE (new.proteus_verification_status) - WHEN "VERIFIED" THEN "CONVERSATION_VERIFIED_PROTEUS" - ELSE "CONVERSATION_DEGRADED_PROTEUS" END + WHEN 'VERIFIED' THEN 'CONVERSATION_VERIFIED_PROTEUS' + ELSE 'CONVERSATION_DEGRADED_PROTEUS' END ), new.qualified_id, (SELECT CAST((julianday('now') - 2440587.5) * 86400 * 1000 AS INTEGER)), (SELECT SelfUser.id FROM SelfUser LIMIT 1), (SELECT Client.id FROM Client WHERE Client.user_id = (SELECT SelfUser.id FROM SelfUser LIMIT 1) LIMIT 1), - "SENT", - "VISIBLE" + 'SENT', + 'VISIBLE' ); UPDATE Conversation - SET degraded_conversation_notified = (new.proteus_verification_status != "DEGRADED") + SET degraded_conversation_notified = (new.proteus_verification_status != 'DEGRADED') WHERE qualified_id = new.qualified_id; END; diff --git a/persistence/src/commonMain/db_user/migrations/66.sqm b/persistence/src/commonMain/db_user/migrations/66.sqm index c8d31e984a4..f95d354e361 100644 --- a/persistence/src/commonMain/db_user/migrations/66.sqm +++ b/persistence/src/commonMain/db_user/migrations/66.sqm @@ -1,6 +1,6 @@ import com.wire.kalium.persistence.dao.conversation.ConversationEntity; -ALTER TABLE Conversation ADD COLUMN legal_hold_status TEXT AS ConversationEntity.LegalHoldStatus NOT NULL DEFAULT "DISABLED"; +ALTER TABLE Conversation ADD COLUMN legal_hold_status TEXT AS ConversationEntity.LegalHoldStatus NOT NULL DEFAULT 'DISABLED'; DROP VIEW IF EXISTS ConversationDetails; diff --git a/persistence/src/commonMain/db_user/migrations/70.sqm b/persistence/src/commonMain/db_user/migrations/70.sqm index fc00e14d128..709fbdb0306 100644 --- a/persistence/src/commonMain/db_user/migrations/70.sqm +++ b/persistence/src/commonMain/db_user/migrations/70.sqm @@ -16,7 +16,7 @@ Message.visibility AS visibility, Message.expects_read_confirmation AS expectsReadConfirmation, Message.expire_after_millis AS expireAfterMillis, Message.self_deletion_start_date AS selfDeletionStartDate, -IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = "READ"), 0) AS readCount, +IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = 'READ'), 0) AS readCount, User.name AS senderName, User.handle AS senderHandle, User.email AS senderEmail, diff --git a/persistence/src/commonMain/db_user/migrations/73.sqm b/persistence/src/commonMain/db_user/migrations/73.sqm index 25fe4170c8b..fd5d618aeb5 100644 --- a/persistence/src/commonMain/db_user/migrations/73.sqm +++ b/persistence/src/commonMain/db_user/migrations/73.sqm @@ -21,7 +21,7 @@ Message.expects_read_confirmation AS expectsReadConfirmation, Message.expire_after_millis AS expireAfterMillis, Message.self_deletion_start_date AS selfDeletionStartDate, Message.self_deletion_end_date AS selfDeletionEndDate, -IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = "READ"), 0) AS readCount, +IFNULL ((SELECT COUNT (*) FROM Receipt WHERE message_id = Message.id AND type = 'READ'), 0) AS readCount, User.name AS senderName, User.handle AS senderHandle, User.email AS senderEmail,