mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Prepare history import
This commit is contained in:
parent
1e94909c41
commit
e11c1b5d20
4 changed files with 32 additions and 0 deletions
|
@ -12,5 +12,6 @@ module Legacy
|
|||
has_many :domain_contact_maps, foreign_key: :domainid
|
||||
has_many :nsset_contact_maps, foreign_key: :nssetid, primary_key: :nsset
|
||||
has_many :domain_histories, foreign_key: :id
|
||||
alias_method :history, :domain_histories
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,5 +3,7 @@ module Legacy
|
|||
self.table_name = :domain_history
|
||||
|
||||
belongs_to :domain, foreign_key: :id
|
||||
belongs_to :history, foreign_key: :historyid
|
||||
has_one :object_history, foreign_key: :historyid, primary_key: :historyid
|
||||
end
|
||||
end
|
||||
|
|
5
app/models/legacy/history.rb
Normal file
5
app/models/legacy/history.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
module Legacy
|
||||
class History < Db
|
||||
self.table_name = :history
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue