removeAllConfiguration: Use json_remove instead of json_patch
This commit is contained in:
parent
61b7eebfcf
commit
3f1adec614
1 changed files with 2 additions and 5 deletions
|
@ -5369,7 +5369,6 @@ async function removeAll(): Promise<void> {
|
||||||
// Anything that isn't user-visible data
|
// Anything that isn't user-visible data
|
||||||
async function removeAllConfiguration(): Promise<void> {
|
async function removeAllConfiguration(): Promise<void> {
|
||||||
const db = getInstance();
|
const db = getInstance();
|
||||||
const patch: Partial<ConversationType> = { senderKeyInfo: undefined };
|
|
||||||
|
|
||||||
db.transaction(() => {
|
db.transaction(() => {
|
||||||
db.exec(
|
db.exec(
|
||||||
|
@ -5384,10 +5383,8 @@ async function removeAllConfiguration(): Promise<void> {
|
||||||
DELETE FROM jobs;
|
DELETE FROM jobs;
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
db.prepare('UPDATE conversations SET json = json_patch(json, $patch);').run(
|
db.exec(
|
||||||
{
|
"UPDATE conversations SET json = json_remove(json, '$.senderKeyInfo');"
|
||||||
patch: JSON.stringify(patch),
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue