Infos:
- Used Zammad version: 6.3
- Used Zammad installation type: package
- Operating system: Debian 12
- Browser + version: Does not matter ;(
Expected behavior:
- Database migration works
Actual behavior:
We did an Upgrade via package, and during the database migration, this error occured:
# Clear cache...
# database.yml found. Updating db...
== 20230912080534 GroupHierarchy: migrating ===================================
-- change_column(:groups, :name, :string, {:limit=>970})
-> 0.1559s
-- add_column(:groups, :name_last, :string, {:limit=>160, :null=>true})
-> 0.0005s
-- add_column(:groups, :parent_id, :integer, {:null=>true})
-> 0.0004s
-- add_foreign_key(:groups, :groups, {:column=>:parent_id})
-> 0.0444s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "histories_pkey"
DETAIL: Key (id)=(425121) already exists.
What helped
We are unsure why the problem occured (the histories:id column has been unique before). What we did was some apt reinstall zammad
to trigger migration (should be possible via console or rake, but we were unable to make this work), run another PostGreSQL dump via the backup script, poking around with pgAdmin, and after another reinstall
, the migration ran through.
Possibly, Zammad had not been shot down by the installation properly, and received new input from postfix, which had issues sending some notifications out.
Just wanted to report this issue, knowing that it may be of limited use, given no way to actually reproduce it.