chore: remove unused telegram bot model (#12417)
## Summary - remove unused TelegramBot model and its association - drop obsolete telegram_bots table
This commit is contained in:
@@ -89,7 +89,6 @@ class Account < ApplicationRecord
|
||||
has_many :portals, dependent: :destroy_async, class_name: '::Portal'
|
||||
has_many :sms_channels, dependent: :destroy_async, class_name: '::Channel::Sms'
|
||||
has_many :teams, dependent: :destroy_async
|
||||
has_many :telegram_bots, dependent: :destroy_async
|
||||
has_many :telegram_channels, dependent: :destroy_async, class_name: '::Channel::Telegram'
|
||||
has_many :twilio_sms, dependent: :destroy_async, class_name: '::Channel::TwilioSms'
|
||||
has_many :twitter_profiles, dependent: :destroy_async, class_name: '::Channel::TwitterProfile'
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: telegram_bots
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# auth_key :string
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# account_id :integer
|
||||
#
|
||||
|
||||
class TelegramBot < ApplicationRecord
|
||||
belongs_to :account
|
||||
has_one :inbox, as: :channel, dependent: :destroy_async
|
||||
validates :auth_key, uniqueness: { scope: :account_id }
|
||||
end
|
||||
Reference in New Issue
Block a user