Feature/close connections

Close all connections before dropping the database