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

change update to upsert

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-09-25 16:59:02 +03:00
parent 256188e0a8
commit 6de0414732
No known key found for this signature in database
GPG Key ID: DB82A1577B38F66B

View File

@ -178,7 +178,7 @@ export default class FeatureToggleStore implements IFeatureToggleStore {
for (const env of Object.keys(environmentArrays)) {
const toggleNames = environmentArrays[env].sort();
await this.db(FEATURE_ENVIRONMENTS_METRICS_TABLE)
.update({ last_seen_at: now })
.upsert({ last_seen_at: now })
.where('environment', env)
.whereIn(
'feature_name',