Incubator-superset: Relation "ab_user_role" does not exist

Created on 13 Jun 2019  路  3Comments  路  Source: apache/incubator-superset

I've cloned the latest source code from github, When i ran the docker command to create admin. docker-compose run --rm -e FLASK_APP=superset superset flask fab create-admin . The output looks like:

Starting superset_redis_1    ... done
Starting superset_postgres_1 ... done
+ '[' 3 -ne 0 ']'
+ exec flask fab create-admin
Username [admin]:
User first name [admin]:
User last name [user]:
Email [[email protected]]:
Password:
Repeat for confirmation:
Loaded your LOCAL configuration at [/home/superset/superset/superset_config.py]
Recognized Database Authentications.
2019-06-13 06:29:11,340:ERROR:flask_appbuilder.security.sqla.manager:Error adding new user to database. (psycopg2.ProgrammingError) relation "ab_user_role" does not exist
LINE 1: INSERT INTO ab_user_role (id, user_id, role_id) VALUES (next...
                    ^

[SQL: INSERT INTO ab_user_role (id, user_id, role_id) VALUES (nextval('ab_user_role_id_seq'), %(user_id)s, %(role_id)s) RETURNING ab_user_role.id]
[parameters: {'user_id': 12, 'role_id': 1}]
(Background on this error at: http://sqlalche.me/e/f405)
No user created an error occured

Expected results

I expected that the user admin should be created

Actual results

The table ab_user_role is missing. It seems that database schema is not created properly.

Additional context

The code run on Docker on Ubuntu 18

Do I miss any step to initialize the database schema?

#bug inactive

Most helpful comment

Hi,

try to run first:
docker-compose run --rm -e FLASK_APP=superset superset flask fab create-db

or

docker-compose run --rm -e FLASK_APP=superset superset superset db upgrade

All 3 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.56. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Hi,

try to run first:
docker-compose run --rm -e FLASK_APP=superset superset flask fab create-db

or

docker-compose run --rm -e FLASK_APP=superset superset superset db upgrade

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amien90 picture amien90  路  3Comments

ylkjick532428 picture ylkjick532428  路  3Comments

thoralf-gutierrez picture thoralf-gutierrez  路  3Comments

deity-bram picture deity-bram  路  3Comments

fly-high-bj picture fly-high-bj  路  3Comments