1. refine migrations;
2. update table funtions;