Reduce schema.sql

First step of #2360, and #1549.