implemented Database structure update to migrating from old db