Updated tables sql commands and finished transfer