function addDept() {
  inquirer.prompt([
    {
      type: "input",
      name: "addDept",
      message: "What will the name of the department be?"
    }
  ]).then((answer) => {
    connection.query(
      "INSERT INTO department SET ?",
      {
        name: answer.addDept
      },
      function (err, res) {
        if (err) throw err;
        console.log("Department added.\n");
        startUp();
      })
  })
}
//Functions used to add to database.
Functions used to add to database.
Functions used to add to database .
function addDept() {
  inquirer.prompt([
    {
      type: "input",
      name: "addDept",
      message: "What will the name of the department be?"
    }
  ]).then((answer) => {
    connection.query(
      "INSERT INTO department SET ?",
      {
        name: answer.addDept
      },
      function (err, res) {
        if (err) throw err;
        console.log("Department added.\n");
        startUp();
      })
  })
}
function addDept ( ) { inquirer . prompt ( [ { type : "input" , name : "addDept" , message : "What will the name of the department be?" } ] ) . then ( ( answer ) => { connection . query ( "INSERT INTO department SET ?" , { name : answer . addDept } , function ( err , res ) { if ( err ) throw err ; console . log ( "Department added.\n" ) ; startUp ( ) ; } ) } ) }
Functions used to add to database.
Functions used to add to database .