Integrated prehash table creation into db.sql