Habeeb556 commented on issue #29582: URL: https://github.com/apache/superset/issues/29582#issuecomment-2227285913
@justmike1 I tried simulating this setup, and it worked for me using the following configuration in `superset_config.py`: ```python # Metadata Repository SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost/databasename?options=-c%20search_path=schemaname' ``` Ensure you connect to the database and create the new schema: ```sql \c databasename CREATE SCHEMA schemaname; GRANT ALL ON SCHEMA schemaname TO username; ``` Then, run the following commands to upgrade and initialize the new configuration on this schema: ```bash export FLASK_APP=superset superset db upgrade superset init ``` This will initialize a new configuration, not migrate from the old schema to the new schema. If you want to migrate production data, I recommend setting the new schema name in `superset_config.py` and simply renaming the public schema. ```sql ALTER SCHEMA schema_name RENAME TO new_name; ``` > Note: If you're working in a production environment, make sure to take a backup of the database before proceeding to safeguard against any potential issues. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
