Fix sqlite structure