Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/server/models/LivechatDepartment.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class LivechatDepartment extends Base {

this.tryEnsureIndex({ name: 1 });
this.tryEnsureIndex({ businessHourId: 1 }, { sparse: true });
this.tryEnsureIndex({ type: 1 }, { sparse: true });
this.tryEnsureIndex({
numAgents: 1,
enabled: 1,
Expand Down
2 changes: 2 additions & 0 deletions app/models/server/models/LivechatTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { Base } from './_Base';
export class LivechatTrigger extends Base {
constructor() {
super('livechat_trigger');

this.tryEnsureIndex({ enabled: 1 });
}

updateById(_id, data) {
Expand Down
3 changes: 3 additions & 0 deletions ee/app/models/server/models/LivechatUnitMonitors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { Base } from '../../../../../app/models';
export class LivechatUnitMonitors extends Base {
constructor() {
super('livechat_unit_monitors');

this.tryEnsureIndex({ monitorId: 1 });
this.tryEnsureIndex({ unitId: 1 });
}

findByUnitId(unitId) {
Expand Down