Browse Source

fixed 清除user未使用关联表

pull/342/head
xxqfamous 3 years ago
parent
commit
1b2a4e0b94
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      app/models/user.rb

+ 4
- 4
app/models/user.rb View File

@@ -127,13 +127,13 @@ class User < Owner
has_many :versions
has_many :issue_times, :dependent => :destroy

has_one :onclick_time, :dependent => :destroy
# has_one :onclick_time, :dependent => :destroy

# 新版私信
has_many :private_messages, dependent: :destroy
# has_many :private_messages, dependent: :destroy
has_many :recent_contacts, through: :private_messages, source: :target
has_many :tidings, :dependent => :destroy
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
# has_many :journals_for_messages, :as => :jour, :dependent => :destroy

has_many :attachments,foreign_key: :author_id, :dependent => :destroy

@@ -143,7 +143,7 @@ class User < Owner
has_many :apply_user_authentication
has_one :process_real_name_apply, -> { processing.real_name_auth.order(created_at: :desc) }, class_name: 'ApplyUserAuthentication'
has_one :process_professional_apply, -> { processing.professional_auth.order(created_at: :desc) }, class_name: 'ApplyUserAuthentication'
has_many :apply_actions, dependent: :destroy
# has_many :apply_actions, dependent: :destroy
has_many :trail_auth_apply_actions, -> { where(container_type: 'TrialAuthorization') }, class_name: 'ApplyAction'

# has_many :attendances


Loading…
Cancel
Save