adrianpostoaca opened a new issue #19237:
URL: https://github.com/apache/superset/issues/19237
A clear and concise description of what the bug is.
#### How to reproduce the bug
1. Download apache/superset image
2. Extend the image with cx_Oracle + Oracle instantclient_21_5
3. Start docker run -d -p 8080:8088 --name superset apache/superset
4. Connect to container and update SQLALCHEMY_DATABASE_URI with Oracle
connection string into /app/superset/config.py
6. Execute docker exec -it superset superset db upgrade
7. Receive error:
INFO [alembic.runtime.migration] Running upgrade -> 4e6a06bad7a8, Init
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py",
line 1276, in _execute_context
self.dialect.do_execute(
File
"/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line
608, in do_execute
cursor.execute(statement, parameters)
cx_Oracle.DatabaseError: ORA-02274: duplicate referential constraint
specifications
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts',
'superset')())
.............................
sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-02274: duplicate
referential constraint specifications
[SQL:
CREATE TABLE metrics (
id INTEGER NOT NULL,
metric_name VARCHAR2(512 CHAR),
verbose_name VARCHAR2(1024 CHAR),
metric_type VARCHAR2(32 CHAR),
datasource_name VARCHAR2(255 CHAR),
json CLOB,
description CLOB,
PRIMARY KEY (id),
FOREIGN KEY(datasource_name) REFERENCES datasources
(datasource_name),
FOREIGN KEY(datasource_name) REFERENCES datasources (datasource_name)
)
From what we noticed, same column reference is reference twice.
--
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]