diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js --- a/keyserver/src/database/migration-config.js +++ b/keyserver/src/database/migration-config.js @@ -74,6 +74,17 @@ ); }, ], + [ + 9, + async () => { + await dbQuery( + SQL` + ALTER TABLE messages + ADD COLUMN IF NOT EXISTS target_message bigint(20) DEFAULT NULL; + `, + ); + }, + ], ]); const newDatabaseVersion: number = Math.max(...migrations.keys()); diff --git a/keyserver/src/database/setup-db.js b/keyserver/src/database/setup-db.js --- a/keyserver/src/database/setup-db.js +++ b/keyserver/src/database/setup-db.js @@ -88,7 +88,8 @@ type tinyint(3) UNSIGNED NOT NULL, content mediumtext COLLATE utf8mb4_bin, time bigint(20) NOT NULL, - creation varchar(255) COLLATE utf8mb4_bin DEFAULT NULL + creation varchar(255) COLLATE utf8mb4_bin DEFAULT NULL, + target_message bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; CREATE TABLE notifications (