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

async function testInsert() {
    try {
        const testId = '00000000-0000-0000-0000-000000000000';
        await db.sequelize.query(`
            INSERT INTO request_participants ("id", "requestId", "requestType", "userId", "participantType", "joinedMethod", "createdAt", "updatedAt")
            VALUES (gen_random_uuid(), '${testId}', 'test', '9950ee60-ddf6-4091-a1e6-e7161e6d8bb6', 'architecture', 'manual', now(), now())
        `);
        console.log('✅ Manual insert successful!');
        
        // Clean up
        await db.sequelize.query(`DELETE FROM request_participants WHERE "requestId" = '${testId}'`);
        console.log('✅ Clean up successful!');
    } catch (error: any) {
        console.error('❌ Manual insert failed:', error.message);
    } finally {
        process.exit(0);
    }
}

testInsert();
