Enhance question in DB migration script

This change refers to #9526.