Enhanced reset-database bash script