Zammad crashed after 3.6 update?

Yeah. Isn’t there a possibility for rake to check if tables already exist? At least, it should be checked in my eyes.
Apart from that - editing that file solved the issue for me, so everyone else: changing one file to the following resolves the issue with the table “smime_certificates” for now. Please be aware to check if the table really exists with the values given in that file before you remove or edit it!

zammaduser$ vim db/migrate/20200121000001_smime_support.rb
zammaduser$ cat db/migrate/20200121000001_smime_support.rb
class SMIMESupport < ActiveRecord::Migration[5.2]
def up

# return if it's a new setup
return if !Setting.exists?(name: 'system_init_done')

Setting.create_if_not_exists(
  title:       'S/MIME integration',
  name:        'smime_integration',
  area:        'Integration::Switch',
  description: 'Defines if S/MIME encryption is enabled or not.',
  options:     {
    form: [
      {
        display: '',
        null:    true,
        name:    'smime_integration',
        tag:     'boolean',
        options: {
          true  => 'yes',
          false => 'no',
        },
      },
    ],
  },
  state:       false,
  preferences: {
    prio:           1,
    authentication: true,
    permission:     ['admin.integration'],
  },
  frontend:    true
)
Setting.create_if_not_exists(
  title:       'S/MIME config',
  name:        'smime_config',
  area:        'Integration::SMIME',
  description: 'Defines the S/MIME config.',
  options:     {},
  state:       {},
  preferences: {
    prio:       2,
    permission: ['admin.integration'],
  },
  frontend:    true,
)
Setting.create_if_not_exists(
  title:       'Defines postmaster filter.',
  name:        '0016_postmaster_filter_smime',
  area:        'Postmaster::PreFilter',
  description: 'Defines postmaster filter to handle secure mailing.',
  options:     {},
  state:       'Channel::Filter::SecureMailing',
  frontend:    false
)

end

end

zammaduser$ vim db/migrate/20200121000001_smime_support.rb
zammaduser$ zammad run rake db:migrate --trace
…(working from now on)

2 Likes