mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Add receive support for pin/unpin message
This commit is contained in:
17
ts/sql/migrations/1570-pinned-messages-updates.std.ts
Normal file
17
ts/sql/migrations/1570-pinned-messages-updates.std.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { WritableDB } from '../Interface.std.js';
|
||||
import { sql } from '../util.std.js';
|
||||
|
||||
export default function updateToSchemaVersion1570(db: WritableDB): void {
|
||||
const [query] = sql`
|
||||
-- We only need the 'messageId' column
|
||||
ALTER TABLE pinnedMessages DROP COLUMN messageSentAt;
|
||||
ALTER TABLE pinnedMessages DROP COLUMN messageSenderAci;
|
||||
|
||||
-- We dont need to know who pinned the message
|
||||
ALTER TABLE pinnedMessages DROP COLUMN pinnedByAci;
|
||||
`;
|
||||
db.exec(query);
|
||||
}
|
||||
@@ -133,6 +133,7 @@ import updateToSchemaVersion1540 from './1540-partial-expiring-index.std.js';
|
||||
import updateToSchemaVersion1550 from './1550-has-link-preview.std.js';
|
||||
import updateToSchemaVersion1560 from './1560-pinned-messages.std.js';
|
||||
import updateToSchemaVersion1561 from './1561-cleanup-polls.std.js';
|
||||
import updateToSchemaVersion1570 from './1570-pinned-messages-updates.std.js';
|
||||
|
||||
import { DataWriter } from '../Server.node.js';
|
||||
|
||||
@@ -1625,6 +1626,7 @@ export const SCHEMA_VERSIONS: ReadonlyArray<SchemaUpdateType> = [
|
||||
{ version: 1560, update: updateToSchemaVersion1560 },
|
||||
// 1561, 1551, and 1541 all refer to the same migration
|
||||
{ version: 1561, update: updateToSchemaVersion1561 },
|
||||
{ version: 1570, update: updateToSchemaVersion1570 },
|
||||
];
|
||||
|
||||
export class DBVersionFromFutureError extends Error {
|
||||
|
||||
Reference in New Issue
Block a user