It's the same database structure as Reddit -- a database in a database anti-pattern. Quoting Wikipedia:
In the database world, developers are sometimes tempted to bypass the RDBMS, for example by storing everything in one big table with three columns labelled entity ID, key, and value. While this entity-attribute-value model allows the developer to break out from the structure imposed by an SQL database, it loses out on all the benefits, since all of the work that could be done efficiently by the RDBMS is forced onto the application instead. Queries become much more convoluted, the indexes and query optimizer can no longer work effectively, and data validity constraints are not enforced. Performance and maintainability can be extremely poor.
LW database is exactly like this. Look at the existing scripts and despair.
Yup, it's pretty horrible. But on the face of it -- I know that appearances can deceive -- it seems like you could iterate (inefficiently, but it's not like this is going to be done often) over all the votes with a given voter-ID as in the "slow" case of user_downvote_karma and call Vote.vote with dir=None as defined in vote.py for each. Something along these lines, though it probably consists entirely of bugs:
from r2.models import Account, Link, Vote
user = Account._by_name('Eugine\_Nier')
# list() to make sure enumeration is done before we sta...
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one. (Immediately before; refresh the list-of-threadspage before posting.)
3. Open Threads should be posted in Discussion, and not Main.
4. Open Threads should start on Monday, and end on Sunday.