signal-desktop/ts/sql/migrations/1010-call-links-table.ts

24 lines
620 B
TypeScript
Raw Normal View History

2024-04-01 12:19:35 -07: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';
2024-04-01 12:19:35 -07:00
import { sql } from '../util.js';
2024-04-01 12:19:35 -07:00
2025-08-06 10:32:08 -07:00
export default function updateToSchemaVersion1010(db: Database): void {
const [createTable] = sql`
CREATE TABLE callLinks (
roomId TEXT NOT NULL PRIMARY KEY,
rootKey BLOB NOT NULL,
adminKey BLOB,
name TEXT NOT NULL,
-- Enum which stores CallLinkRestrictions from ringrtc
restrictions INTEGER NOT NULL,
revoked INTEGER NOT NULL,
expiration INTEGER
) STRICT;
`;
db.exec(createTable);
2024-04-01 12:19:35 -07:00
}