code: def table_schema(self):
          
          if self.__dict__.get('_table_schema') is None:
              self._table_schema = None
              table_schema = {}
              for row in self.query_schema():
                  name, default, dtype = self.db().lexicon.column_info(row)
                  if isinstance(default, str):
                      json_matches = re.findall(r"^\'(.*)\'::jsonb$", default)
                      if len(json_matches) > 0:
                          default = json.loads(json_matches[0])
                  if name == self.primary_key:
                      default = None
                  table_schema[name] = {'default': default, 'type': dtype}
              if len(table_schema):
                  self._table_schema = table_schema
          return self._table_schema
docs: Returns the table schema.
  
          :returns: dict