Fix: moving PK creation of additional tables derived from logging