import { execSync } from "child_process";

const name = process.argv[2];
if (!name) {
  console.error("Error: Migration name is required.");
  process.exit(1);
}

execSync(
  `npx sequelize-cli seed:generate --seeders-path database/seeders --config config/config.js --name ${name}`,
  { stdio: "inherit" }
);

execSync("node renameFiles.js", { stdio: "inherit" });
