Add sql for missing tables