17 lines
454 B
TypeScript
17 lines
454 B
TypeScript
import 'dotenv/config';
|
|
import db from './src/database/models/index.js';
|
|
const { QuestionnaireQuestion } = (db as any).default || db;
|
|
|
|
async function checkQuestions() {
|
|
try {
|
|
const count = await QuestionnaireQuestion.count();
|
|
console.log(`There are ${count} questions in the system.`);
|
|
} catch (error) {
|
|
console.error('Error checking questions:', error);
|
|
} finally {
|
|
process.exit();
|
|
}
|
|
}
|
|
|
|
checkQuestions();
|