20170215000001_telegram_support.rb 517 B

1234567891011121314151617181920212223
  1. class TelegramSupport < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Permission.create_if_not_exists(
  6. name: 'admin.channel_telegram',
  7. note: 'Manage %s',
  8. preferences: {
  9. translations: ['Channel - Telegram']
  10. },
  11. )
  12. Ticket::Article::Type.create_if_not_exists(
  13. name: 'telegram personal-message',
  14. communication: true,
  15. updated_by_id: 1,
  16. created_by_id: 1,
  17. )
  18. end
  19. end