Disabling foreign key checks while performing Sqlalchemy Upgrade
if you are user mysql, you can connect to mysql and use
"SET GLOBAL FOREIGN_KEY_CHECKS = 0;"
delete the db table you want, and again
"SET GLOBAL FOREIGN_KEY_CHECKS = 1;"
This value verifies foreign relationships in the db tables.