Upgrading from 2.0.0 to 3.0.0 AWS AMI Alembic error


#1

I recently deployed the Redash AMI in AWS EC2, which is at version 2.0.0. In my attempt to follow the upgrade instructions, I run sudo bin/upgrade, and receive the following traceback:

Failed running: sudo -u redash bin/run ./manage.py db upgrade
Exit status: 1
Output:
[2018-04-02 17:47:07,619][PID:15822][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2018-04-02 17:47:07,641][PID:15822][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2018-04-02 17:47:08,323][PID:15822][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2018-04-02 17:47:08,324][PID:15822][INFO][alembic.runtime.migration] Will assume transactional DDL.
Traceback (most recent call last):
  File "/opt/redash/redash.3.0.0.b3134/manage.py", line 9, in <module>
    manager()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 229, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_migrate/cli.py", line 132, in upgrade
    _upgrade(directory, revision, sql, tag, x_arg)
  File "/usr/local/lib/python2.7/dist-packages/flask_migrate/__init__.py", line 239, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 254, in upgrade
    script.run_env()
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 425, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 75, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "migrations/env.py", line 87, in <module>
    run_migrations_online()
  File "migrations/env.py", line 80, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/environment.py", line 836, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python2.7/dist-packages/alembic/runtime/migration.py", line 321, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 243, in upgrade
    return script._upgrade_revs(revision, rev)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 338, in _upgrade_revs
    for script in reversed(list(revs))
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 174, in _catch_revision_errors
    compat.raise_from_cause(util.CommandError(resolution))
  File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 128, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 143, in _catch_revision_errors
    yield
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 334, in _upgrade_revs
    revs = list(revs)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py", line 642, in _iterate_revisions
    requested_lowers = self.get_revisions(lower)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py", line 299, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py", line 304, in get_revisions
    for rev_id in resolved_id)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py", line 304, in <genexpr>
    for rev_id in resolved_id)
  File "/usr/local/lib/python2.7/dist-packages/alembic/script/revision.py", line 359, in _revision_for_ident
    resolved_id)
alembic.util.exc.CommandError: Can't locate revision identified by '969126bd800f'

Has anyone encountered this issue before? Is there another step I’m missing that is not documented in the upgrade instructions?