Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Constraint error when adding intervention policy to project-asset #4758

Closed
mwdchang opened this issue Sep 11, 2024 · 0 comments · Fixed by #4759
Closed

[BUG]: Constraint error when adding intervention policy to project-asset #4758

mwdchang opened this issue Sep 11, 2024 · 0 comments · Fixed by #4759
Assignees
Labels
bug Something isn't working

Comments

@mwdchang
Copy link
Member

mwdchang commented Sep 11, 2024

In staging logs.
Looks like we need to update DB constraints

c-4898-8d34-ec5c32529cfa;  [software.uncharted.terarium.hmiserver.interceptors.RequestLoggingInterceptor:78]
2024-09-11 13:43:50 [INFO] REQUEST STARTED | ProjectController.createAsset | method=POST; uri=/projects/2212f848-7d7c-4898-8d34-ec5c32529cfa/assets/intervention-policy/7b7b6d9e-8c10-4b6f-9ac1-ffdbe68afc6a?project-id=2212f848-7d7c-4898-8d34-ec5c32529cfa;  [software.uncharted.terarium.hmiserver.interceptors.RequestLoggingInterceptor:40]
2024-09-11 13:43:50 [WARN] SQL Error: 0, SQLState: 23514 [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:145]
2024-09-11 13:43:50 [ERROR] ERROR: new row for relation "project_asset" violates check constraint "project_asset_asset_type_check"
  Detail: Failing row contains (8bc1ba70-1cc4-4fab-b346-41a32e9fe961, 7b7b6d9e-8c10-4b6f-9ac1-ffdbe68afc6a, Masking (50% efficacy) Vaccination (70,000/day), INTERVENTION_POLICY, 2024-09-11 13:43:50.78967+00, null, null, 2024-09-11 13:43:50.78967+00, 2212f848-7d7c-4898-8d34-ec5c32529cfa, f, f, null, null, []). [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:150]
2024-09-11 13:43:50 [ERROR] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.DataIntegrityViolationException: could not execute statement [ERROR: new row for relation "project_asset" violates check constraint "project_asset_asset_type_check"
  Detail: Failing row contains (8bc1ba70-1cc4-4fab-b346-41a32e9fe961, 7b7b6d9e-8c10-4b6f-9ac1-ffdbe68afc6a, Masking (50% efficacy) Vaccination (70,000/day), INTERVENTION_POLICY, 2024-09-11 13:43:50.78967+00, null, null, 2024-09-11 13:43:50.78967+00, 2212f848-7d7c-4898-8d34-ec5c32529cfa, f, f, null, null, []).] [insert into project_asset (asset_id,asset_name,asset_type,created_on,deleted_on,description,external_ref,file_names,name,project_id,public_asset,temporary,updated_on,id) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; SQL [insert into project_asset (asset_id,asset_name,asset_type,created_on,deleted_on,description,external_ref,file_names,name,project_id,public_asset,temporary,updated_on,id) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; constraint [project_asset_asset_type_check]] with root cause [org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]:175]
org.postgresql.util.PSQLException: ERROR: new row for relation "project_asset" violates check constraint "project_asset_asset_type_check"
@mwdchang mwdchang added the bug Something isn't working label Sep 11, 2024
@blanchco blanchco linked a pull request Sep 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants