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

v2 migration failure #512

Closed Doomsdayrs closed 4 months ago

Doomsdayrs commented 4 months ago

Version: v2.0.0-beta09

Reason

Reason: liquibase.exception.DatabaseException: Duplicate column name 'report_count' [Failed SQL: (1060) ALTER TABLE acrarium.bug ADD report_count INT DEFAULT 0 NULL, ADD latest_report datetime NULL, ADD solved_version_code INT NULL, ADD solved_version_flavor VARCHAR(255) NULL, ADD latest_version_code INT NULL, ADD latest_version_flavor VARCHAR(255) NULL, ADD affected_installations INT DEFAULT 0 NULL]

Error Log

error.log

Notes

I hope this is done in a transaction!

F43nd1r commented 4 months ago

what was your previous version?

Doomsdayrs commented 4 months ago

what was your previous version?

I believe it was: v1.8.1

Then I loaded v2.0.0-beta07 when v2.0.0-beta08 failed to run. After which the error occurred.

Persists in upgrade to v2.0.0-beta09.

Doomsdayrs commented 4 months ago

I checked the files, it seems the database is completely empty.

If you want, I can provide you an archive of the mysql database for testing.

Doomsdayrs commented 4 months ago

With a fresh database, the issue persists, but with a helpful(?) log.

Reason: liquibase.exception.DatabaseException: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) [Failed SQL: (1419) CREATE TRIGGER bug_report_insert AFTER INSERT ON `report` FOR EACH ROW CALL update_bug_report_stats(NEW.`bug_id`)]
F43nd1r commented 4 months ago

I haven't taken the time to update the setup guide for v2. You need --log-bin-trust-function-creators

Doomsdayrs commented 4 months ago

I haven't taken the time to update the setup guide for v2. You need --log-bin-trust-function-creators

Sorry for the late reply, this did fix it!~