first commit: Complete phishing test management panel with Node.js backend and React frontend

This commit is contained in:
salvacybersec
2025-11-10 17:00:40 +03:00
commit 19e551f33b
77 changed files with 6677 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
const { sequelize } = require('../src/models');
async function up() {
try {
console.log('🔄 Creating database tables...');
// Sync all models (create tables)
await sequelize.sync({ force: false });
console.log('✅ All tables created successfully!');
} catch (error) {
console.error('❌ Error creating tables:', error);
throw error;
}
}
async function down() {
try {
console.log('🔄 Dropping all tables...');
await sequelize.drop();
console.log('✅ All tables dropped successfully!');
} catch (error) {
console.error('❌ Error dropping tables:', error);
throw error;
}
}
module.exports = { up, down };