upgrade query and auto add migrate script for above 1.9 version