This commit is contained in:
2025-04-17 23:32:39 +09:00
commit 5b719b6766
105 changed files with 25653 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
'use strict';
const bcrypt = require('bcrypt');
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up (queryInterface, Sequelize) {
// 관리자 계정 비밀번호 해시 생성
const salt = await bcrypt.genSalt(10);
const hashedPassword = await bcrypt.hash('Dlrwns0304#', salt);
// 관리자 계정 생성
await queryInterface.bulkInsert('users', [{
name: '관리자',
email: 'master@jaybe.dev',
password: hashedPassword,
role: 'admin',
status: 'active',
createdAt: new Date(),
updatedAt: new Date()
}], {});
},
async down (queryInterface, Sequelize) {
// 관리자 계정 삭제
await queryInterface.bulkDelete('users', { email: 'master@jaybe.dev' }, {});
}
};