[task] update ddl and add script for migrating db from 0.16 to 0.17