From d4694cd2db435e08ccbe53aeff5d02b2153025bc Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 19 Nov 2025 20:26:22 +0100 Subject: [PATCH] User/Reputation * fix storing negative reputation values --- setup/sql/01-db_structure.sql | 2 +- setup/sql/updates/1763580264_01.sql | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 setup/sql/updates/1763580264_01.sql diff --git a/setup/sql/01-db_structure.sql b/setup/sql/01-db_structure.sql index fa879bac..436226a3 100644 --- a/setup/sql/01-db_structure.sql +++ b/setup/sql/01-db_structure.sql @@ -196,7 +196,7 @@ DROP TABLE IF EXISTS `aowow_account_reputation`; CREATE TABLE `aowow_account_reputation` ( `userId` int(10) unsigned NOT NULL, `action` tinyint(3) unsigned NOT NULL COMMENT 'e.g. upvote a comment', - `amount` tinyint(3) unsigned NOT NULL, + `amount` tinyint(3) NOT NULL, `sourceA` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'e.g. upvoting user', `sourceB` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'e.g. upvoted commentId', `date` int(10) unsigned NOT NULL DEFAULT 0, diff --git a/setup/sql/updates/1763580264_01.sql b/setup/sql/updates/1763580264_01.sql new file mode 100644 index 00000000..4b88130c --- /dev/null +++ b/setup/sql/updates/1763580264_01.sql @@ -0,0 +1,2 @@ +ALTER TABLE `aowow_account_reputation` + MODIFY COLUMN `amount` tinyint(3) signed NOT NULL;