fix find by ids
fix db schema