refine schema for PostgreSQL