alembic.util.exc.CommandError: Can't locate revision identified by '89bc7873a3e0'

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

Technical details:

  • Redash Version:7.0.0+b18042 (4a978bad)
  • Browser/OS:Ubuntu 18.04.5 LTS
  • How did you install Redash: In order to install redash on a server(not local machine), I followed the steps as below:-

Traceback (most recent call last):
File “/app/manage.py”, line 9, in
manager()
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask/cli.py”, line 380, in main
return AppGroup.main(self, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask/cli.py”, line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/app/redash/cli/database.py”, line 34, in create_tables
stamp()
File “/usr/local/lib/python2.7/site-packages/flask_migrate/init.py”, line 360, in stamp
command.stamp(config, revision, sql=sql, tag=tag)
File “/usr/local/lib/python2.7/site-packages/alembic/command.py”, line 579, in stamp
script.run_env()
File “/usr/local/lib/python2.7/site-packages/alembic/script/base.py”, line 489, in run_env
util.load_python_file(self.dir, “env.py”)
File “/usr/local/lib/python2.7/site-packages/alembic/util/pyfiles.py”, line 98, in load_python_file
module = load_module_py(module_id, path)
File “/usr/local/lib/python2.7/site-packages/alembic/util/compat.py”, line 239, in load_module_py
mod = imp.load_source(module_id, path, fp)
File “migrations/env.py”, line 87, in
run_migrations_online()
File “migrations/env.py”, line 80, in run_migrations_online
context.run_migrations()
File “”, line 8, in run_migrations
File “/usr/local/lib/python2.7/site-packages/alembic/runtime/environment.py”, line 846, in run_migrations
self.get_context().run_migrations(**kw)
File “/usr/local/lib/python2.7/site-packages/alembic/runtime/migration.py”, line 507, in run_migrations
for step in self._migrations_fn(heads, self):
File “/usr/local/lib/python2.7/site-packages/alembic/command.py”, line 567, in do_stamp
return script._stamp_revs(util.to_tuple(destination_revs), rev)
File “/usr/local/lib/python2.7/site-packages/alembic/script/base.py”, line 394, in stamp_revs
heads = self.get_revisions(heads)
File “/usr/local/lib/python2.7/site-packages/alembic/script/base.py”, line 227, in get_revisions
return self.revision_map.get_revisions(id
)
File “/usr/local/lib/python2.7/contextlib.py”, line 35, in exit
self.gen.throw(type, value, traceback)
File “/usr/local/lib/python2.7/site-packages/alembic/script/base.py”, line 194, in catch_revision_errors
compat.raise_from_cause(util.CommandError(resolution))
File “/usr/local/lib/python2.7/site-packages/alembic/util/compat.py”, line 312, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File “/usr/local/lib/python2.7/site-packages/alembic/script/base.py”, line 162, in catch_revision_errors
yield
File “/usr/local/lib/python2.7/site-packages/alembic/script/base.py”, line 227, in get_revisions
return self.revision_map.get_revisions(id
)
File “/usr/local/lib/python2.7/site-packages/alembic/script/revision.py”, line 319, in get_revisions
return sum([self.get_revisions(id_elem) for id_elem in id
], ())
File “/usr/local/lib/python2.7/site-packages/alembic/script/revision.py”, line 324, in get_revisions
for rev_id in resolved_id
File “/usr/local/lib/python2.7/site-packages/alembic/script/revision.py”, line 324, in
for rev_id in resolved_id
File “/usr/local/lib/python2.7/site-packages/alembic/script/revision.py”, line 397, in _revision_for_ident
resolved_id,
alembic.util.exc.CommandError: Can’t locate revision identified by ‘89bc7873a3e0’

Can anybody please help me with this?

Why are you installing V7?

No particular reason or compulsion on my side to use a particular version though. I got the same error while trying to install from ‘setup/setup.sh at master · getredash/setup · GitHub’ as well. Can use any advice/suggestions to do so. Would prefer latest stable version