fix updateTables and schema permissions checks