update new defined
All checks were successful
Deploy to Production / deploy (push) Successful in 19s

This commit is contained in:
silverpro89
2026-01-29 14:04:04 +07:00
parent 41cfb533d5
commit 0958e7ddf1
6 changed files with 1006 additions and 4 deletions

26
scripts/sync-gametype.js Normal file
View File

@@ -0,0 +1,26 @@
const { sequelize } = require('../config/database');
const GameType = require('../models/GameType');
async function syncGameType() {
try {
console.log('Starting GameType model synchronization...');
// Sync with alter: true to update existing table structure
await GameType.sync({ alter: true });
console.log('✅ GameType model synchronized successfully!');
console.log('Table structure has been updated to match the model definition.');
// Test query to verify
const count = await GameType.count();
console.log(`Current GameType records: ${count}`);
process.exit(0);
} catch (error) {
console.error('❌ Error syncing GameType model:', error.message);
console.error(error);
process.exit(1);
}
}
syncGameType();