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 @@ -36,6 +36,17 @@ await dbQuery(SQL`ALTER TABLE uploads ADD INDEX container (container)`); }, ], + [ + 5, + async () => { + await dbQuery(SQL` + ALTER TABLE cookies + ADD device_id varchar(255) DEFAULT NULL, + ADD public_key varchar(255) DEFAULT NULL, + ADD social_proof varchar(255) 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 @@ -33,6 +33,9 @@ last_used bigint(20) NOT NULL, device_token varchar(255) DEFAULT NULL, versions json DEFAULT NULL, + device_id varchar(255) DEFAULT NULL, + public_key varchar(255) DEFAULT NULL, + social_proof varchar(255) DEFAULT NULL, \`primary\` TINYINT(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;