Skip to content

Could not parse type name 'character varying' #73

@peymanh

Description

@peymanh

Hi, just like issue #60 and pull request #31 ('NullType' object is not callable), We have the same issue with 'character varying' and 'double precision' too. related screenshot and logs are attached.

.../bin/python manage.py db migrate
INFO  [alembic.runtime.migration] Context impl CockroachDBImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
.../lib/python3.7/site-packages/cockroachdb/sqlalchemy/dialect.py:140: SAWarning: Could not parse type name 'character varying'
  warn("Could not parse type name '%s'" % type_str)
Traceback (most recent call last):
  File "manage.py", line 25, in <module>
    manager.run()
  File ".../lib/python3.7/site-packages/flask_script/__init__.py", line 417, in run
    result = self.handle(argv[0], argv[1:])
  File ".../lib/python3.7/site-packages/flask_script/__init__.py", line 386, in handle
    res = handle(*args, **config)
  File ".../lib/python3.7/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File ".../lib/python3.7/site-packages/flask_migrate/__init__.py", line 95, in wrapped
    f(*args, **kwargs)
  File ".../lib/python3.7/site-packages/flask_migrate/__init__.py", line 215, in migrate
    version_path=version_path, rev_id=rev_id)
  File ".../lib/python3.7/site-packages/alembic/command.py", line 176, in revision
    script_directory.run_env()
  File ".../lib/python3.7/site-packages/alembic/script/base.py", line 427, in run_env
    util.load_python_file(self.dir, 'env.py')
  File ".../lib/python3.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file
    module = load_module_py(module_id, path)
  File ".../lib/python3.7/site-packages/alembic/util/compat.py", line 82, in load_module_py
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "flask_migrations/env.py", line 88, in <module>
    run_migrations_online()
  File "flask_migrations/env.py", line 81, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File ".../lib/python3.7/site-packages/alembic/runtime/environment.py", line 836, in run_migrations
    self.get_context().run_migrations(**kw)
  File ".../lib/python3.7/site-packages/alembic/runtime/migration.py", line 321, in run_migrations
    for step in self._migrations_fn(heads, self):
  File ".../lib/python3.7/site-packages/alembic/command.py", line 156, in retrieve_migrations
    revision_context.run_autogenerate(rev, context)
  File ".../lib/python3.7/site-packages/alembic/autogenerate/api.py", line 415, in run_autogenerate
    self._run_environment(rev, migration_context, True)
  File ".../lib/python3.7/site-packages/alembic/autogenerate/api.py", line 451, in _run_environment
    autogen_context, migration_script)
  File ".../lib/python3.7/site-packages/alembic/autogenerate/compare.py", line 22, in _populate_migration_script
    _produce_net_changes(autogen_context, upgrade_ops)
  File ".../lib/python3.7/site-packages/alembic/autogenerate/compare.py", line 48, in _produce_net_changes
    autogen_context, upgrade_ops, schemas
  File ".../lib/python3.7/site-packages/alembic/util/langhelpers.py", line 313, in go
    fn(*arg, **kw)
  File ".../lib/python3.7/site-packages/alembic/autogenerate/compare.py", line 75, in _autogen_for_tables
    inspector, upgrade_ops, autogen_context)
  File ".../lib/python3.7/site-packages/alembic/autogenerate/compare.py", line 168, in _compare_tables
    inspector.reflecttable(t, None)
  File ".../lib/python3.7/site-packages/sqlalchemy/engine/reflection.py", line 618, in reflecttable
    table_name, schema, **table.dialect_kwargs):
  File ".../lib/python3.7/site-packages/sqlalchemy/engine/reflection.py", line 369, in get_columns
    **kw)
  File ".../lib/python3.7/site-packages/cockroachdb/sqlalchemy/dialect.py", line 141, in get_columns
    typ = sqltypes.NULLTYPE()
TypeError: <flask_script.commands.Command object at 0x1053d7dd8>: 'NullType' object is not callable

Process finished with exit code 1

screen shot 2018-12-19 at 9 52 53 am

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions