midgetspy/Sick-Beard — pull request #576 by hobeone (2013-02-05 02:48:39+00:00)
Title: Peewee

A more complete version of pull request 575. Converts most everything to go through the peewee ORM.

I've added a few tests to check some of the changed code, but there's still a lot of coverage missing. It's working for me though. There's one or two complex SQL commands that I still need to convert but everything else is converted.

A big open question is what the upgrade path for this will be. The easiest may be to have a script to dump the current db, delete it, create it from scratch and then repopulate it. The cache.db is easier in that you can just blow it away and start over.

Another question is what to do in tvcache.py. I'd like to change it to just use one table and add a column for provider name. That'll be easier to use with Peewee and should work just as well.

After everything is going through peewee it should be easy to start using mysql or postgres as the backend.