Fix sqlite schema