add lattice_document and associated tables