17 lines
539 B
TypeScript
17 lines
539 B
TypeScript
import 'dotenv/config';
|
|
import db from './src/database/models/index.js';
|
|
|
|
async function run() {
|
|
try {
|
|
console.log('Attempting to drop constraint request_participants_requestId_fkey...');
|
|
await db.sequelize.query('ALTER TABLE request_participants DROP CONSTRAINT IF EXISTS "request_participants_requestId_fkey"');
|
|
console.log('Constraint dropped successfully.');
|
|
process.exit(0);
|
|
} catch (error) {
|
|
console.error('Error dropping constraint:', error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
run();
|