mirror of
https://github.com/opengram-server/opengram.git
synced 2026-07-20 12:40:17 +03:00
12 lines
295 B
JavaScript
12 lines
295 B
JavaScript
// Script to delete old StarsSnapshot from MongoDB
|
|
// Run this in MongoDB shell or via mongosh
|
|
|
|
use MyTelegram;
|
|
|
|
// Delete all StarsSnapshots with old version
|
|
db['eventflow.snapshots'].deleteMany({
|
|
'Metadata.AggregateId': { $regex: '^stars-' }
|
|
});
|
|
|
|
print('Old StarsSnapshots deleted');
|