def visit_VARCHAR(self, type_, **kw):
        if type_.length:
            return self._extend_string(
                type_, {}, "VARCHAR(%d)" % type_.length)
        else:
            raise exc.CompileError(
                "VARCHAR requires a length on dialect %s" %
                self.dialect.name)

  to

def visit_VARCHAR(self, type_, **kw):
        if type_.length is None:
            type_.length = 255
        if type_.length:
            return self._extend_string(
                type_, {}, "VARCHAR(%d)" % type_.length)
        else:
            raise exc.CompileError(
                "VARCHAR requires a length on dialect %s" %
                self.dialect.name)

  

相关文章:

  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-07-22
  • 2021-07-14
  • 2021-08-11
猜你喜欢
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
相关资源
相似解决方案