1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

task: make count column bigint. (#8183)

We now have customers that exceed INT capacity, so we need to change
this to BIGINT in client_metrics_env_variants_daily as well.

Even heavy users only have about 10000 rows here, so should be a quick
enough operation.
This commit is contained in:
Christopher Kolstad 2024-09-19 10:59:40 +02:00 committed by GitHub
parent 15a98fcaf4
commit 29b292f1ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -119,7 +119,7 @@ const variantRowReducerV2 = (acc, tokenRow) => {
};
}
if (variant) {
acc[key].variants[variant] = count;
acc[key].variants[variant] = Number(count);
}
return acc;

View File

@ -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);
};