From 67732ec009f8dad61038914bafeba64ee271c4df Mon Sep 17 00:00:00 2001 From: Peter Havekes Date: Fri, 16 Feb 2024 11:59:49 +0100 Subject: [PATCH] Increase database field size for notificationaddress, to allow storing actual FCM addresses, instead of (shorter) TX addresses Co-authored-by: Thijs Kinkhorst --- config/db/mysql-create-tables.sql | 2 +- config/db/mysql-upgrade-notificationaddress.sql | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 config/db/mysql-upgrade-notificationaddress.sql diff --git a/config/db/mysql-create-tables.sql b/config/db/mysql-create-tables.sql index 79f2cdcf..fbf0708a 100644 --- a/config/db/mysql-create-tables.sql +++ b/config/db/mysql-create-tables.sql @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS user ( tmpblockattempts integer, blocked tinyint(1), notificationtype varchar(10), - notificationaddress varchar(64) + notificationaddress varchar(256) ); CREATE TABLE IF NOT EXISTS tiqrstate ( diff --git a/config/db/mysql-upgrade-notificationaddress.sql b/config/db/mysql-upgrade-notificationaddress.sql new file mode 100644 index 00000000..29f3c516 --- /dev/null +++ b/config/db/mysql-upgrade-notificationaddress.sql @@ -0,0 +1,5 @@ +/* + Initially the notificationaddress column was created as varchar(64). That is fine for + tokenaxchange addresses, but too small for FCM addresses. + */ +ALTER TABLE user MODIFY notificationaddress VARCHAR (256);