Upgrade from 4.1 to 5.0.3 fails with old files leftover issues

Infos:

  • Used Zammad version: 4.1 to 5.0.3
  • Used Zammad installation type: source
  • Operating system: Ubuntu 20.04.3
  • Browser + version: Chrome 96+

Expected behavior:

  • expecting to run rake db:migrate successfully

Actual behavior:

  • rake db:migrate fails to execute with duplicate migrations for setting_add_internal_article_check

Steps to reproduce the behavior:

  • Stop Zammad instance
  • Create backup
  • Switch to zammad user
  • Clear Zammad Cache (rails r “Cache.clear”)
  • Install new Dependencies (nodejs, Ruby 2.7.4, bundler, rake, rails)
  • Update .bashrc default ruby version to use
  • switch to root user
  • Download stable version of Zammad (wget stable.tar.gz)
  • Extract tar to Zammad folder (tar -xzf stable.tar.gz --strip-components 1 -C zammad)
  • Change ownership of files (chown -R zammad:zammad zammad/)
  • Check that database.yml file has 600 permisiones set and its owned by zammad:zammad
  • switch to zammad user
  • Run gem install bundler (again, as per instructions)
  • Run bundle install --without test development mysql
  • Run rake db:migrate (which fails with duplicate migrations)

After I found the error I went to the db/mgrate folder and did an

ls -ltrh | grep internal

and found two (2) files for setting_add_internal_article_check.rb:

Then I went to other folders like: config/initializers and found to other files that seem to be left overs from 4.1 version…

Is it necessary to first upgrade to 5.0 and the apply the update to 5.03? I would appreciate any input on this issue.

Best,

Javier

I see several files that remain from

I ran a find . -mtime +9 to see which files are older than the date from 5.0.3 and found the following files:

./config/pre_commit.yml
./config/initializers/workaround_active_job_time_serialization.rb
./config/initializers/workaround_active_job_logging.rb
./app/assets/javascripts/app/views/generic/ticket_selector.jst.eco
./app/assets/javascripts/app/views/generic/ticket_selector_row.jst.eco
./app/assets/javascripts/app/lib/app_post/ticket_create_collection.coffee
./app/assets/javascripts/app/controllers/agent_ticket_create/form_hander_signature.coffee
./app/assets/javascripts/app/controllers/ticket_zoom/form_handler_dependencies.coffee
./app/assets/javascripts/app/controllers/ticket_zoom/owner_handler_dependencies.coffee
./app/models/concerns/has_knowledge_base_attachment_permissions.rb
./app/models/concerns/has_ticket_create_screen_impact.rb
./app/models/user/has_ticket_create_screen_impact.rb
./app/controllers/application_controller/has_secure_content_security_policy_for_downloads.rb
./app/controllers/sessions
./app/controllers/sessions/collection_base.rb
./app/controllers/sessions/collection_ticket.rb
./app/controllers/sessions/collection_dashboard.rb
./app/jobs/ticket_create_screen_job.rb
./db/migrate/202104070000001_setting_add_internal_article_check.rb

I will retry the upgrade to 5.0.3 manually deleting these files, hope this goes well…

Best,

Javier

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.