make tables.sql more compatible