mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
fix: max revision query order (#4096)
This commit is contained in:
parent
464ef5b326
commit
803610ab82
@ -158,8 +158,11 @@ class EventStore implements IEventStore {
|
||||
async getMaxRevisionId(largerThan: number = 0): Promise<number> {
|
||||
const row = await this.db(TABLE)
|
||||
.max('id')
|
||||
.whereNotNull('feature_name')
|
||||
.orWhere('type', SEGMENT_UPDATED)
|
||||
.where((builder) =>
|
||||
builder
|
||||
.whereNotNull('feature_name')
|
||||
.orWhere('type', SEGMENT_UPDATED),
|
||||
)
|
||||
.andWhere('id', '>=', largerThan)
|
||||
.first();
|
||||
return row ? row.max : -1;
|
||||
|
Loading…
Reference in New Issue
Block a user