feature #232564 by greggles: refactor data structure so core tables are not altered and move towards PostgreSQL compliance