Changes to schema for PostgreSQL compatibility.