Ported create_links, added trigger to disable src_count updating, added auto increment value in update script