20230406114415_rename_token_fields.rb 365 B

12345678910111213
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class RenameTokenFields < ActiveRecord::Migration[6.1]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. rename_column :tokens, :name, :token
  7. rename_column :tokens, :label, :name
  8. Token.reset_column_information
  9. end
  10. end