help?
redash 4.0 dump restore at the end of submit error 500 internal server error apos restart postgres and supervisor

File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py”, line 469, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (psycopg2.ProgrammingError) column users.profile_image_url does not exist
LINE 1: SELECT users.profile_image_url AS users_profile_image_url, u…
^
[SQL: ‘SELECT users.profile_image_url AS users_profile_image_url, users.groups AS users_groups, users.updated_at AS users_updated_at, users.created_at AS users_created_at, users.id AS users_id, users.org_id AS users_org_id, users.name AS users_name, users.email AS users_email, users.password_hash AS users_password_hash, users.api_key AS users_api_key \nFROM users \nWHERE lower(users.email) = lower(%(lower_1)s) AND %(param_1)s = users.org_id’] [parameters: {‘lower_1’: u’rogeriosergio2008@gmail.com’, ‘param_1’: 1}]
[2018-05-03 23:56:08,948][PID:28282][INFO][metrics] method=POST path=/forgot endpoint=redash_forgot_password status=500 content_type=? content_length=-1 duration=10.61 query_count=1 query_duration=0.96

1 Like

You didn’t apply migrations.

./manage.py db migrate

error

File “/usr/local/lib/python2.7/dist-packages/alembic/autogenerate/api.py”, line 427, in _run_environment
raise util.CommandError(“Target database is not up to date.”)
alembic.util.exc.CommandError: Target database is not up to date.

how to do the migrations in docker?

1 Like

Hi @alim @rogeriosergio2008

I ran my docker image with “manage db upgrade” as the command, that ran the migrations for me, then I stopped it and started it with “server” as the command. This solved the issue.

If this is outside of docker I guess “./manage.py db upgrade” will work. (I didn’t test this)

The “migrate” command is used to actually generate the migrations, it’s a bit different compared to Django. :slight_smile:

1 Like

after pg_restore
did the
cd / opt / redash / current
sudo bin / upgrade

success