Duffer Derek
// generate-migration.js
import { execSync } from 'child_process';
const tableName = process.argv[2];
if (!tableName) {
console.error('Error: Please provide a table name.');
process.exit(1);
}
const command = `npx sequelize-cli migration:generate --name create_${tableName}_table --migrations-path src/database/migrations`;
try {
execSync(command, { stdio: 'inherit' });
} catch (error) {
console.error('Error:', error.message);
process.exit(1);
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists