Skip to content

Upgrade instructions

aplaice edited this page Aug 29, 2021 · 34 revisions

This page includes instructions on how to upgrade from specific versions of the deck. If your upgrade scenario is not listed below, please refer to the instructions in the README.

Unless otherwise mentioned, the version of the deck is given on the deck description page.

From v4.1 to v5.0

English versions of the decks (standard and extended)

You can follow the normal installation/upgrade procedures.

All other language versions of the deck

Due to a mishap with GUIDs (which are about as annoying as they sound :)), the original v4.1 release was buggy. QUESTION: Is this too casual? (My point was to emphasise that the problem wasn't on the side of the contents, but of the "plumbing", without digging into the details.) The v4.1 release was quickly taken down and the issue fixed in the v4.1.1 release, but you might have installed the buggy version in the meantime.

You'll have the buggy version if you installed between 1 February and 6 February 2021. If you don't remember when you installed the deck (I wouldn't, after several months!), you can check whether you have the buggy version of v4.1 ("v4.1.0") with this debug console snippet:

Debug console snippet to determine if you have the buggy v4.1
# Scotland chosen because its name is different in all our languages.
guid_scotland = "h~5xz+=ke~"
en_scotland = "Scotland"
scotland_fields_arr = mw.col.db.execute("SELECT flds FROM notes WHERE GUID = ?", guid_scotland)
if len(scotland_fields_arr) == 1:
    scotland_country_name = scotland_fields_arr[0][0].split('\x1f')[0]
    if scotland_country_name == en_scotland:
        print("You have the English version of the deck.")
        print("v4.1.1 and v4.1 are identical for you, so you don't have to worry!")
    else:
        # In principle, it's also possible you have the English version,
        # but changed the name of Scotland.  However, it's unlikely.
        print("You have the buggy version of v4.1 (v4.1.0)!")
else:
    print("You DO NOT have the buggy version of v4.1!")

If you're not familiar with the debug console, you can access it with Ctrl+Shift+;. After pasting the snippet into the top box, you can execute it with Ctrl+Enter.

From v4.1.1

If you have the Czech, German, Spanish, Dutch, Russian or Swedish version of the deck (standard or extended), you can upgrade using the normal installation/upgrade procedures.

If you have the French or Norwegian (Bokmål) versions of the deck, you need to first run a debug console script.

Rationale if you're interested in why this is necessary

Every note in Anki has a GUID (globally unique id). This allows two notes to be recognised as the same, irrespective of what deck, whose collection or what device they're in.

Due to design choices in the previous Deck Manager we used (anki-dm), the GUIDs in the English and Norwegian versions of the deck were the same, and so were the GUIDs in the French and Spanish versions of the deck.

This meant that while it was possible for somebody to have, say, the English, German and Spanish decks, in parallel, in the same Anki collection, they could not have both the English and Norwegian decks or both the French and Spanish decks, together. For instance, if you had the French version of the deck and tried to install the Spanish version, then due to the clashing GUIDs, Anki would think that the notes in the Spanish deck were updates to the notes in the French deck, and would overwrite your French deck, instead of adding the Spanish deck in parallel.

This limitation wasn't catastrophic, but it was annoying and confusing to explain, so we decided to migrate the French and Norwegian GUIDs, in order to remove it.

French deck

You need to run the following debug console script. Note that if you use AnkiWeb, a full upload will be necessary the next time you sync.

Debug console snippet to migrate the French GUIDs
guid_mapping = \
[('6=u<D5pin$', 'p);vRzMs+W'),
 ('9hd8!!ycm1', 'Ive-9<)?/'),
 ('-*s*/9Bs5]', 'o6puwHE{j4'),
 ('4X<I%j50vO', 'ua?z9KS@^h'),
 ('&<jl3wt=@N', 'o.l+o.aIv#'),
 ('9V(hJ,wI/J', 'i+%_VY]7bt'),
 ('#VI;#M=9p0', 'vwLrgavleL'),
 ('#f!B=ER`FI', 'umk_Ql/M`8'),
 ('(=4za=v)XL', 'F*@Hxe1UYX'),
 ('!t*473y]Ab', 'oTmq$Cq1H`'),
 ('&kNm}C1;F^', 'fe<{h`wWIF'),
 ('8HhkHhJ{zG', 'dTNjd[5|Ge'),
 ('56heGus|:W', 'e?6[KX^Js+'),
 (',{L,s4k?Ei', 'CJb&~c&tZv'),
 ('$*(t0;xm-I', '0/,+rSKt6'),
 ('%-!:KaSHN^', 'qTFGENa@Y3'),
 ('#1;Z.gJtCH', 'AtMq%)YA4~'),
 ('&HCzzs8Azt', 'O0NI(S,j2o'),
 ('/$EW+%8{uu', 'm]_=p1zwik'),
 ('3sa$9R,{2H', 'uuu#3&G{(R'),
 ('.E2S!BCc]o', 'qMOzrk<+(:'),
 ('$0oS&elogg', 'zXq}ul(8_E'),
 ('sMhU>3vg+', 'i_0H+>}|<.'),
 ('$~oj/Wt/Ds', 'G6=c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'QplodT,RlZ'),
 ('}.rQ5q3d<D', 'b<9P_L#s6?'),
 (',:Shm37_h@', 'L}~TYYHI[l'),
 ('<a]{=Rhi4', 'Jt*Ggc<HyU'),
 ('@]8x06>+BF', 'vhs6OnHZaA'),
 ('>]pOHrn[3r', 'H1L?;^]mY]'),
 ('5g?v1zUT>w', 'IG)L^LIKi]'),
 ('a%:~pq*Zm{', 'jcw8^HL&m5'),
 ('-f.maKrMXZ', 'P}xBc:eoH6'),
 ('.-9~%U?$I:', 'yu2IoRS.M)'),
 ('6P-AoL#`1)', 'k]|`O*|sYC'),
 ('*Y0`l7(NW{', 'HnPq%JW}F9'),
 ('+q6ucl<dnP', 'BZ#71-])!<'),
 ('b-MN}/UQnp', 'hzN$`?YJ.^'),
 ('#6!CT^2j*&', 'H5FPagvP>_'),
 ('Ktd^5Q1j?', 'FIQ,YV4(u'),
 ('5%Xglve#^/', 'FE||8n;*pO'),
 (')*H8xs9sa@', 's~{9dxCHY+'),
 ('{miPy~A<!k', 'BLz2@~|QXB'),
 ('f01lKj)]XJ', 'Q&)&?}53&@'),
 ('4siewp.4[V', 'bP[|CaNP86'),
 ('(eHZaC~(l;', 'Ba#m$J?4gW'),
 ('<y2-E`C%:d', 'Mie3UMRyst'),
 (':zYlU5e>v/', 'n^,sUM_!k_'),
 ('h,gB?X*uD', 'xAxtN`17x^'),
 (')3u-*ZQo7+', 'B35In/Q=Tg'),
 ('3LA?Jag<~4', 'GRj)gtiMbo'),
 ('awWq`A6Q!q', 'l&Uv?yLL12'),
 ('ftTMc81UP$', 'bMX+]D]Ya>'),
 ('*E7|5>f|hE', 'E9Y{~}fJ|q'),
 ('+N5*Ov8;6:', 'wx)T{wK99M'),
 ('unrS^0xLD', 'vk=UoW^`zU'),
 ('.!m2T?CMvM', 'Ek~&z$tb-I')]

def replace_guids(mw, mapping):
    for guid_i, guid_f in mapping:
        # These should NOT be present.
        ids = mw.col.db.execute("SELECT id FROM notes WHERE guid = ?", guid_f)
        if not len(ids) == 0:
            print(f"GUID {guid_f} already exists as note id(s) {ids}!")
            print("You either already have the deck with the correct GUIDs or something's gone wrong.")
            print("Aborting GUID-replacement operation!")
            return 1
        # These should be present.
        ids = mw.col.db.execute("SELECT id FROM notes WHERE guid = ?", guid_i)
        if not len(ids) == 1:
            print(f"Warning: note with GUID {guid_i} does not exist!")
            # not aborting — the user might have simply deleted some notes
    for guid_i, guid_f in mapping:
        # Not doing everything in one go with `executemany` for readability.
        mw.col.db.executemany("UPDATE notes SET guid = ? WHERE guid = ?", [(guid_f, guid_i)])
    # We need to force a full sync!
    mw.col.db.execute("update col set scm=?", int(time.time() * 1000))
    print("GUID replacement was successful! "
          "If you use AnkiWeb, a full upload will be needed next time you sync!")
    
replace_guids(mw, guid_mapping)

If you're not familiar with the debug console, you can access it with Ctrl+Shift+;. After pasting the snippet into the top box, you can execute it with Ctrl+Enter.

After running the debug console script (and after or before the full sync — it doesn't matter), you can upgrade to v5.0 by following the normal installation/upgrade procedures.

Norwegian (Bokmål) deck

You need to run the following debug console script. Note that if you use AnkiWeb, a full upload will be necessary the next time you sync.

Debug console snippet to migrate the Norwegian GUIDs
guid_mapping = \
[('e+/O]%*qfk', 'iR~,tG{Val'),
 ('h~5xz+=ke~', 'dYU=!{y0JI'),
 ('s9-GL*@AXD', 'o+)poCG*[u'),
 ('cPO|Cru8n<', 'rymWNfd[Q['),
 ('m*#%sE.`.;', 'PgW-Gd/F7?'),
 ('hNE9}>;Q&-', 'D_u6CIg+wo'),
 ('jN|NAUP*h}', 'emhqi6m<;X'),
 ('j|z@PMgdx,', 'K-DUUlt#`y'),
 ('n+t>2`:;P/', 'dSwjDNnc7['),
 ('ilGtw#=asM', 'fWbYL=>/W&'),
 ('mcc&0Kq^xE', 'L5j),}Ge5('),
 ('gz9${p}er*', 'l$1j[S4Z_w'),
 ('dY96`C-f(_', 'AY#z1NqLE<'),
 ('r>aI-$$|wT', 'po@@>#g44W'),
 ('k9E.p^<u$,', 'ru^aT_ML-F'),
 ('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', 'OGgh6NLJ_1'),
 ('Qlib4)q2Hk', 'Cay~/DU6[Y'),
 ('pwwZu{7f~(', 'q>RaVbPB3|'),
 ('qFuGdDx^Yv', 'A.lC&CUT?S'),
 ('Cf2@;p<aL', 'Q)zp&X@y?g'),
 ('t2&ri|[Un:', 'Hg&j8uJWA$')]

def replace_guids(mw, mapping):
    for guid_i, guid_f in mapping:
        # These should NOT be present.
        ids = mw.col.db.execute("SELECT id FROM notes WHERE guid = ?", guid_f)
        if not len(ids) == 0:
            print(f"GUID {guid_f} already exists as note id(s) {ids}!")
            print("You either already have the deck with the correct GUIDs or something's gone wrong.")
            print("Aborting GUID-replacement operation!")
            return 1
        # These should be present.
        ids = mw.col.db.execute("SELECT id FROM notes WHERE guid = ?", guid_i)
        if not len(ids) == 1:
            print(f"Warning: note with GUID {guid_i} does not exist!")
            # not aborting — the user might have simply deleted some notes
    for guid_i, guid_f in mapping:
        # Not doing everything in one go with `executemany` for readability.
        mw.col.db.executemany("UPDATE notes SET guid = ? WHERE guid = ?", [(guid_f, guid_i)])
    # We need to force a full sync!
    mw.col.db.execute("update col set scm=?", int(time.time() * 1000))
    print("GUID replacement was successful! "
          "If you use AnkiWeb, a full upload will be needed next time you sync!")
    
replace_guids(mw, guid_mapping)

If you're not familiar with the debug console, you can access it with Ctrl+Shift+;. After pasting the snippet into the top box, you can execute it with Ctrl+Enter.

After running the debug console script (and after or before the full sync — it doesn't matter), you can upgrade to v5.0 by following the normal installation/upgrade procedures.

From v4.1 ("v4.1.0")

TODO

From v4.0

Clone this wiki locally