You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/05/22 14:28:23 UTC

[GitHub] [incubator-superset] elukey commented on pull request #8493: Fix column type on dbs.encrypted_extra, add instructions for testing migration downgrades

elukey commented on pull request #8493:
URL: https://github.com/apache/incubator-superset/pull/8493#issuecomment-632721492


   Hi everybody, for some the first time that I migrated from 0.35.2 I didn't see any bug, but then I had to re-do it and I noticed the following when running `db upgrade`:
   
   ```
   [..]
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/sqlalchemy/dialects/mysql/base.py", line 2035, in visit_VARCHAR
       "VARCHAR requires a length on dialect %s" % self.dialect.name
   sqlalchemy.exc.CompileError: VARCHAR requires a length on dialect mysql
   ```
   
   I found something similar in https://github.com/apache/incubator-superset/issues/9878 but not really sure where this comes from. I am running Mariadb 10.3.22, is it something db-specific? Has anybody else already encountered this problem?
   
   If I check the specific line in `base.py` (belongs to `MySQLTypeCompiler`) I see the following:
   
   ```
       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
               )
   ```
   
   EncryptedType doesn't seem to have a length afaics, maybe there is a quick fix to support Mariadb/Mysql as well?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org