#!/bin/bash
main() {
	echo ***WARNING*** This will delete all migrations and delete the existing database.
	echo This action is permanent and can only be recovered with version control. 
	echo 
	read -p "Do you wish to continue (enter yes to continue): " decision
	
	if [ "$decision" == "yes" ]; then
		cd /Users/jamullan/Documents/School/Carleton/SeniorFiles/AcadS20/COMPS/classifieds-backend/classifieds_project/main_app
		find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
		find . -path "*/migrations/*.pyc"  -delete
		cd ..
		rm db.sqlite3
		echo operations completed
	else
		echo process aborted
	fi
}

main
