RamiAly opened a new issue, #22873: URL: https://github.com/apache/superset/issues/22873
A clear and concise description of what the bug is. We have a dedicated separate postgres DB for metadata database of superset and we now we migrated the data(whole DB/schema) to another host and now we reinitialixed superset with the credentials of new metadatabse which is identical to old one and we can login with same old credentials and see listing for dasboards and chart but when opening we get a generic FATAL Error , thought it has something to do with SECRET_KEY but its the default one unchanged since then, now when i try to add a new database or change password of that DB i get ``` ERROR: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.errors.NotNullViolation) null value in column "id" of relation "logs" violates not-null constraint DETAIL: Failing row contains (null, test_connection_attempt, 1, {"path": "/api/v1/database/test_connection/", "engine": "Postgre..., 2023-01-26 15:02:35.873124, null, 0, null, http://127.0.0.1:8088/databaseview/list/?pageIndex=0&sortColumn=...). ``` 1. set up sueprset via docker or kubernetes and insert a dedicated postgres backend for metadata DB 2. shut down superset and reinitialize it on clean slate with new DB 3. you will be able to login with old credentials as the metadata like auth are migrated 4. you get an error when opening any of the charts or dashboards or even when editing or adding database connection ### Expected results expected is to be able see dashboards and change DB connection settings or add new DB ### Actual results ERROR: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.errors.NotNullViolation) null value in column "id" of relation "logs" violates not-null constraint DETAIL: Failing row contains (null, test_connection_attempt, 1, {"path": "/api/v1/database/test_connection/", "engine": "Postgre..., 2023-01-26 14:58:25.496645, null, 0, null, http://127.0.0.1:8088/databaseview/list/?pageIndex=0&sortColumn=...). [SQL: INSERT INTO logs (action, user_id, slice_id, json, dttm, referrer) VALUES (%(action)s, %(user_id)s, %(slice_id)s, %(json)s, %(dttm)s, %(referrer)s) RETURNING logs.id] [parameters: {'action': 'test_connection_attempt', 'user_id': 1, 'slice_id': 0, 'json': '{"path": "/api/v1/database/test_connection/", "engine": "PostgresEngineSpec"}', 'dttm': datetime.datetime(2023, 1, 26, 14, 58, 25, 496645), 'referrer': 'http://127.0.0.1:8088/databaseview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc'}] (Background on this error at: https://sqlalche.me/e/14/gkpj) (Background on this error at: https://sqlalche.me/e/14/7s2a) what actually happens. #### Screenshots If applicable, add screenshots to help explain your problem.    ### Environment same result on multiple superset versions 1.4.1 , 1.5.1 ,1.5.2 , 2.0.0 ### Additional context Add any other context about the problem here. -- 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: notifications-unsubscr...@superset.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org