function addDepartment() {
    inquirer.prompt([
        {
            type: "input",
            name: "newDeptName",
            message: "Please enter then name for the new Department:"
        }
    ])
    .then(answers => {
        db.query(
            `INSERT INTO department SET ?`,
            {
                name: answers.newDeptName
            },
            function (err, results) {
                if (err) throw err;
                console.log('\x1b[33m%s\x1b[0m', 'New department Added to the database!\n');
                comfirmPrompt();
            }
        );        
    });
}
//fuction to add new department to the database
fuction to add new department to the database
fuction to add new department to the database
function addDepartment() {
    inquirer.prompt([
        {
            type: "input",
            name: "newDeptName",
            message: "Please enter then name for the new Department:"
        }
    ])
    .then(answers => {
        db.query(
            `INSERT INTO department SET ?`,
            {
                name: answers.newDeptName
            },
            function (err, results) {
                if (err) throw err;
                console.log('\x1b[33m%s\x1b[0m', 'New department Added to the database!\n');
                comfirmPrompt();
            }
        );        
    });
}
function addDepartment ( ) { inquirer . prompt ( [ { type : "input" , name : "newDeptName" , message : "Please enter then name for the new Department:" } ] ) . then ( answers => { db . query ( ` ` , { name : answers . newDeptName } , function ( err , results ) { if ( err ) throw err ; console . log ( '\x1b[33m%s\x1b[0m' , 'New department Added to the database!\n' ) ; comfirmPrompt ( ) ; } ) ; } ) ; }
fuction to add new department to the database
fuction to add new department to the database