ChatMigrations.sys.mjs (816B)
1 import { MESSAGE_CONV_ID_INDEX } from "./ChatSql.sys.mjs"; 2 3 /* 4 This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ 7 8 /** 9 * Please refer to sql.mjs for details on creating new migrations. 10 * 11 * - List each change here and what it's for. 12 * 13 * @param {OpenedConnection} conn - The SQLite connection to use for the migration 14 * @param {number} version - The version number of the current schema 15 */ 16 async function applyV2(conn, version) { 17 if (version < 2) { 18 await conn.execute(MESSAGE_CONV_ID_INDEX); 19 } 20 } 21 22 /** 23 * Array of migration functions to run in the order they should be run in. 24 * 25 * @returns {Array<Function>} 26 */ 27 export const migrations = [applyV2];