code: def field_type(self):
          
          if not self.model:
              return 'JSON'
          database = self.model._meta.database
          if isinstance(database, Proxy):
              database = database.obj
          if Json and isinstance(database, PostgresqlDatabase):
              return 'JSON'
          return 'TEXT'
docs: Return database field type.