fixed upgrade script to skip duplicate unique key (mode, tags) rows