Update pgsql and sqlite schema, and test