20230418164321_add_pre_defined_webhook_columns.rb 578 B

123456789101112131415
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class AddPreDefinedWebhookColumns < ActiveRecord::Migration[6.1]
  3. def change
  4. return if !Setting.exists?(name: 'system_init_done')
  5. change_table :webhooks do |t|
  6. t.column :pre_defined_webhook_type, :string, limit: 250, null: true
  7. t.column :customized_payload, :boolean, null: false, default: false
  8. t.column :preferences, :text, limit: 500.kilobytes + 1, null: true
  9. end
  10. Webhook.reset_column_information
  11. end
  12. end