23 lines
605 B
TypeScript
23 lines
605 B
TypeScript
import db from '../src/database/models/index.js';
|
|
|
|
async function cleanup() {
|
|
console.log('Starting Cleanup: Removing Dealer from F&F Participant lists...');
|
|
|
|
try {
|
|
const result = await db.RequestParticipant.destroy({
|
|
where: {
|
|
requestType: 'fnf',
|
|
participantType: 'owner'
|
|
}
|
|
});
|
|
|
|
console.log(`Cleanup complete! Removed ${result} dealer entries from F&F collections.`);
|
|
} catch (error) {
|
|
console.error('Error during cleanup:', error);
|
|
} finally {
|
|
process.exit();
|
|
}
|
|
}
|
|
|
|
cleanup();
|