Skip to content

Commit 918de42

Browse files
committed
refactor(database): remove indexes creation for interests collection
- Removed the code responsible for creating indexes for the 'interests' collection - This change optimizes the database seeding process by eliminating unnecessary indexing
1 parent 64d3373 commit 918de42

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/src/services/database_seeding_service.dart

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -252,19 +252,6 @@ class DatabaseSeedingService {
252252
});
253253
_log.info('Ensured indexes for "push_notification_devices".');
254254

255-
// Indexes for the interests collection
256-
await _db.runCommand({
257-
'createIndexes': 'interests',
258-
'indexes': [
259-
{
260-
// Optimizes fetching interests for a specific user.
261-
'key': {'userId': 1},
262-
'name': 'userId_index',
263-
},
264-
],
265-
});
266-
_log.info('Ensured indexes for "interests".');
267-
268255
// Indexes for the in-app notifications collection
269256
await _db.runCommand({
270257
'createIndexes': 'in_app_notifications',

0 commit comments

Comments
 (0)