1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00

task: make count column bigint. (#8183) (#8184)

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 11:54:17 +02:00 committed by GitHub
parent 434344ab96
commit 4c9622e449
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);
};