Commit graph

11 commits

Author SHA1 Message Date
Damien Elmes
aa559431b6 on upgrade all cards of a note should share the same due # 2012-04-06 12:45:01 +09:00
Damien Elmes
b413b1562a when updating, preserve unmapped fields 2012-03-25 02:07:20 +09:00
Damien Elmes
cabf25bacc add upgrade unit test 2012-03-12 12:42:26 +09:00
Damien Elmes
beef571d95 include _, remove some old unittest support files 2012-03-07 06:10:18 +09:00
Damien Elmes
1d29c7bcc0 foreign card importing; mnemosyne 2.0 importer 2012-03-07 05:45:52 +09:00
Damien Elmes
ebac628187 ensure duplicate model creation times are accounted for 2011-08-26 22:33:24 +09:00
Damien Elmes
5868ff52b9 handle duplicate fact creation times 2011-08-26 22:28:35 +09:00
Damien Elmes
be045d451c remove the media table
The media table was originally introduced when Anki hashed media filenames,
and needed a way to remember the original filename. It also helped with:
1) getting a quick list of all media used in the deck, or the media added
   since the last sync, for mobile clients
2) merging identical files with different names

But had some drawbacks:
- every operation that modifies templates, models or facts meant generating
  the q/a and checking if any new media had appeared
- each entry is about 70 bytes, and some decks have 100k+ media files

So we remove the media table. We address 1) by being more intelligent about
media downloads on the mobile platform. We ask the user after a full sync if
they want to look for missing media, and they can choose not to if they know
they haven't added any. And on a partial sync, we can scan the contents of the
incoming facts for media references, and download any references we find. This
also avoids all the issues people had with media not downloading because it
was in their media folder but not in the media database.

For 2), when copying media to the media folder, if we have a duplicate
filename, we check if that file has the same md5, and avoid copying if so.
This won't merge identical content that has separate names, but instances
where users need that are rare.
2011-04-28 09:23:56 +09:00
Damien Elmes
368bdf8d05 set the new types on upgrade 2011-04-28 09:23:56 +09:00
Damien Elmes
3cb4ade4a1 simplify bold/italic/underline tags from qt in upgrade 2011-04-28 09:23:53 +09:00
Damien Elmes
668a58b65a update unit tests for sqlalchemy drop 2011-04-28 09:23:53 +09:00