mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
chore: prevent duplicate key errors in unknown flags (#9940)
https://linear.app/unleash/issue/2-3561/fix-duplicate-key-errors-in-unknown-flags This should prevent `duplicate_key` errors in unknown flags. Follow-up to: https://github.com/Unleash/unleash/pull/9837 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
8b115122fc
commit
bfc583b5b7
@ -33,7 +33,10 @@ export class UnknownFlagsStore implements IUnknownFlagsStore {
|
||||
app_name: flag.appName,
|
||||
seen_at: flag.seenAt,
|
||||
}));
|
||||
await tx(TABLE).insert(rows);
|
||||
await tx(TABLE)
|
||||
.insert(rows)
|
||||
.onConflict(['name', 'app_name'])
|
||||
.merge(['seen_at']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user