diff --git a/src/lib/features/metrics/client-metrics/client-metrics-store-v2.ts b/src/lib/features/metrics/client-metrics/client-metrics-store-v2.ts index 7fa222f44628..4ec3abde5e82 100644 --- a/src/lib/features/metrics/client-metrics/client-metrics-store-v2.ts +++ b/src/lib/features/metrics/client-metrics/client-metrics-store-v2.ts @@ -119,7 +119,7 @@ const variantRowReducerV2 = (acc, tokenRow) => { }; } if (variant) { - acc[key].variants[variant] = count; + acc[key].variants[variant] = Number(count); } return acc; diff --git a/src/migrations/20240919083625-client-metrics-env-variants-daily-to-bigint.js b/src/migrations/20240919083625-client-metrics-env-variants-daily-to-bigint.js new file mode 100644 index 000000000000..31f1f0c78c0d --- /dev/null +++ b/src/migrations/20240919083625-client-metrics-env-variants-daily-to-bigint.js @@ -0,0 +1,7 @@ +exports.up = function(db, cb) { + db.runSql(`ALTER TABLE client_metrics_env_variants_daily ALTER COLUMN count TYPE BIGINT`, cb); +}; + +exports.down = function(db, cb) { + db.runSql(`ALTER TABLE client_metrics_env_variants_daily ALTER COLUMN count TYPE INT`, cb); +};