import { sequelize } from '../database/models/index.js';

async function dropConstraint() {
    try {
        console.log('Dropping worknotes_requestId_fkey constraint...');
        await sequelize.query('ALTER TABLE "worknotes" DROP CONSTRAINT IF EXISTS "worknotes_requestId_fkey"');
        console.log('Constraint dropped successfully (if it existed).');
        process.exit(0);
    } catch (error) {
        console.error('Error dropping constraint:', error);
        process.exit(1);
    }
}

dropConstraint();
