Files
uldp-degree-mangement-system/scripts/2025_12_02_114122_asd.js
r2xrzh9q2z-lab d1b931d547 first commit
2026-02-02 11:07:09 +07:00

33 lines
719 B
JavaScript

require('dotenv').config();
const connectDB = require('../config/database');
/**
* Migration: asd
* Created: 11:41:22 2/12/2025
*/
async function migrate() {
try {
// Kết nối database
await connectDB();
console.log('Starting migration: asd...');
// TODO: Thêm code migration của bạn ở đây
console.log('Migration asd completed successfully!');
const mongoose = require('mongoose');
await mongoose.disconnect();
process.exit(0);
} catch (error) {
console.error('Migration error:', error);
process.exit(1);
}
}
// Chạy migration nếu được gọi trực tiếp
if (require.main === module) {
migrate();
}
module.exports = { migrate };