20220228095014_fix_draft_user_required.rb 695 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class FixDraftUserRequired < ActiveRecord::Migration[6.0]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. change_column :ticket_shared_draft_zooms, :created_by_id, :integer, null: false
  7. change_column :ticket_shared_draft_zooms, :updated_by_id, :integer, null: false
  8. change_column :ticket_shared_draft_starts, :created_by_id, :integer, null: false
  9. change_column :ticket_shared_draft_starts, :updated_by_id, :integer, null: false
  10. Ticket::SharedDraftStart.reset_column_information
  11. Ticket::SharedDraftZoom.reset_column_information
  12. end
  13. end