When I try to upgrade from 2.3.2 to 2.3.6 I see this error:
I, [2019-12-02T07:43:47.773465 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
ArgumentError: Unknown migration version "6.0"; expected one of "4.2", "5.0", "5.1", "5.2"
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration/compatibility.rb:11:in `find'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:536:in `[]'
/var/www/discourse/plugins/discourse-assign/db/migrate/20191119174425_rename_site_setting_assign_emailer.rb:3:in `<top (required)>'
.......................................
If I disable discourse-assign plugin - all works fine…
But! One month later I upgrated another discourse forum from 2.3.2 to 2.3.6 - all passed good…
What I doing wrong?
I try:
Here is the guilty one: 20191119174425_rename_site_setting_assign_emailer.rb
Contains:
# frozen_string_literal: true
class RenameSiteSettingAssignEmailer < ActiveRecord::Migration[6.0]
def up
execute "UPDATE site_settings
SET name = 'assign_mailer', value = '#{AssignMailer.levels[:always]}', data_type = #{SiteSettings::TypeSup
ervisor.types[:enum]}
WHERE name = 'assign_mailer_enabled' AND value = 't' AND data_type = #{SiteSettings::TypeSupervisor.types[
:enum]}"
execute "UPDATE site_settings
SET name = 'assign_mailer', value = '#{AssignMailer.levels[:never]}', data_type = #{SiteSettings::TypeSupe
rvisor.types[:enum]}
WHERE name = 'assign_mailer_enabled' AND value = 'f' AND data_type = #{SiteSettings::TypeSupervisor.types[
:enum]}"
end
def down
raise ActiveRecord::IrreversibleMigration
end
end
How can i fix this? If I fix it directly in this file, will the repository be downloaded again when the rebuild starts and my changes will be erased?