Reworked database schema, now using JSON blobs for Repository and Policy data.