import db from './src/database/models/index.js';

async function syncAuditTables() {
    try {
        console.log('Syncing Module-Specific Audit Tables...');
        await db.ResignationAudit.sync({ alter: true });
        await db.TerminationAudit.sync({ alter: true });
        await db.FnFAudit.sync({ alter: true });
        await db.ConstitutionalAudit.sync({ alter: true });
        await db.RelocationAudit.sync({ alter: true });
        await db.FnF.sync({ alter: true });
        console.log('Sync complete.');
        process.exit(0);
    } catch (error) {
        console.error('Sync failed:', error);
        process.exit(1);
    }
}

syncAuditTables();
