schema fixes for postgres