implemented generaing DB migration and update DB