Get The Last Inserted ID when using Zend_Db

I was working in migration script which I am only using Zend_Db Component with the MVC (Normally I use Zend_Db_Table) and it seems that $db->insert(‘table_name’, $data); is not returning the last inserted id and after some investgation I fount that to get the last inserted id you should use the following method