From 37009a28f236f09f98ced4cde0090673ca01bcda Mon Sep 17 00:00:00 2001 From: Kushie Date: Fri, 24 Jul 2026 00:42:37 +0200 Subject: [PATCH] fix: widen stat_daily up/down columns from SMALLINT to unsigned INTEGER (#7618) --- .../2026-07-22-0000-fix-stat-daily-overflow.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 db/knex_migrations/2026-07-22-0000-fix-stat-daily-overflow.js diff --git a/db/knex_migrations/2026-07-22-0000-fix-stat-daily-overflow.js b/db/knex_migrations/2026-07-22-0000-fix-stat-daily-overflow.js new file mode 100644 index 000000000..b8f807094 --- /dev/null +++ b/db/knex_migrations/2026-07-22-0000-fix-stat-daily-overflow.js @@ -0,0 +1,13 @@ +exports.up = function (knex) { + return knex.schema.alterTable("stat_daily", function (table) { + table.integer("up").unsigned().notNullable().alter(); + table.integer("down").unsigned().notNullable().alter(); + }); +}; + +exports.down = function (knex) { + return knex.schema.alterTable("stat_daily", function (table) { + table.smallint("up").notNullable().alter(); + table.smallint("down").notNullable().alter(); + }); +};