F43nd1r / Acrarium

A Backend for ACRA written in Kotlin using Spring Boot, Vaadin and MySQL
Apache License 2.0
195 stars 51 forks source link

Creation of custom column, can lead to errors, when multiple Apps are created #499

Closed Backfisch145 closed 5 months ago

Backfisch145 commented 5 months ago

CC = Custom column

When creating a CC in App A, App B doesn't load if it cant find the CC there too.

The Ui doesn't show the CC but in the Background this exception is thrown:

org.springframework.jdbc.BadSqlGrammarException: jOOQ; bad SQL grammar [select `report`.`id`, `report`.`android_version`, `report`.`date`, `report`.`phone_model`, `report`.`marketing_device`, `report`.`installation_id`, `report`.`is_silent`, `report`.`exception_class`, `report`.`message`, `report`.`version_code`, `report`.`version_flavor`, `report`.`bug_id`, `report`.`custom_BUILD_CONFIG.BUILD_TYPE` as `CUSTOM_COLUMNS.custom_BUILD_CONFIG.BUILD_TYPE`, `report`.`custom_CUSTOM_DATA.User` as `CUSTOM_COLUMNS.custom_CUSTOM_DATA.User` from `report` use index (`IDX_report_date`) where `report`.`app_id` = ? order by `report`.`date` desc limit ? offset ?]
.
.
.

Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'report.custom_BUILD_CONFIG.BUILD_TYPE' in 'field list'

My current workaround is, creating the same CC in both Apps.

Version: 2.0.0-beta07