Fixed DB and added migrate script