signal-desktop/ts/sql/migrations/1260-sync-tasks-rowid.ts

14 lines
398 B
TypeScript
Raw Normal View History

2024-12-04 14:03:29 -08:00
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2025-03-12 14:45:54 -07:00
import type { Database } from '@signalapp/sqlcipher';
import { sql } from '../util.js';
2024-12-04 14:03:29 -08:00
2025-08-06 10:32:08 -07:00
export default function updateToSchemaVersion1260(db: Database): void {
const [query] = sql`
DROP INDEX IF EXISTS syncTasks_order;
CREATE INDEX syncTasks_delete ON syncTasks (attempts DESC);
`;
2024-12-04 14:03:29 -08:00
2025-08-06 10:32:08 -07:00
db.exec(query);
2024-12-04 14:03:29 -08:00
}