feat: change require syntax to import

This commit is contained in:
Rohit
2025-03-27 00:09:45 +05:30
parent ed9af243d4
commit 091c1daa27
4 changed files with 19 additions and 10 deletions

View File

@@ -1,8 +1,12 @@
'use strict';
const { execSync } = require('child_process');
const path = require('path');
const db = require('./models');
import { execSync } from 'child_process';
import path from 'path';
import { fileURLToPath } from 'url';
import db from './models/index.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
async function runMigrations() {
try {