From 68e7a3164ec9c185f4df0b5dc557d43383b83cf5 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Thu, 25 Apr 2024 14:02:04 +0300 Subject: [PATCH] fix: flag trends should support bigint for yes and no evaluations (#6930) Recently we see some pods failing with inserting yes, no values that were over int. Increasing type to bigint. --- .../20240425132155-flag-trends-bigint.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migrations/20240425132155-flag-trends-bigint.js diff --git a/src/migrations/20240425132155-flag-trends-bigint.js b/src/migrations/20240425132155-flag-trends-bigint.js new file mode 100644 index 0000000000..18ddaf2dab --- /dev/null +++ b/src/migrations/20240425132155-flag-trends-bigint.js @@ -0,0 +1,14 @@ +exports.up = function (db, cb) { + db.runSql(` + ALTER TABLE flag_trends ALTER COLUMN total_yes TYPE bigint; + ALTER TABLE flag_trends ALTER COLUMN total_no TYPE bigint; + `, cb); +}; + +exports.down = function (db, cb) { + db.runSql( + ` + `, + cb, + ); +};