code: def add_ir_model_fields(cr, columnspec):
      
      for column in columnspec:
          query = 'ALTER TABLE ir_model_fields ADD COLUMN %s %s' % (
              column)
          logged_query(cr, query, [])
docs: Typically, new columns on ir_model_fields need to be added in a very
      early stage in the upgrade process of the base module, in raw sql
      as they need to be in place before any model gets initialized.
      Do not use for fields with additional SQL constraints, such as a
      reference to another table or the cascade constraint, but craft your
      own statement taking them into account.
  
      :param columnspec: tuple of (column name, column type)