Currently I am using Apache Superset version 3.0.1
I want to make schema changes in the ab_user table of superset.
In the config file I made the necessary changes. But this schema change is not applied to the DB.
When I run superset, it throws the error the said ‘custom column’ doesn’t exist in DB.
I tried ‘superset db upgrade’ and ‘superset init’ commands. But still the changes aren’t reflected in DB. Is there any flags or other commands that needs to be run so that the schema changes reflect in DB.
The code used is attached below.
from flask_appbuilder.security.sqla.models import User
from sqlalchemy import (
Column,
String
)
class CustomUser(User):
__tablename__ = "ab_user"
time_zone = Column(String(64))
This adds time_zone to the schema for ab_user. But this column doesn’t get added to DB.
I was expecting the schema change to be automatically applied to the ab_user table in superset database. I tried ‘superset db upgrade’ and ‘superset init’ commands. But still the changes aren’t reflected in DB.
user25537039 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.