mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Story#108521790 - first try to import nameservers
This commit is contained in:
parent
5f0421af38
commit
f6d16f51e9
6 changed files with 119 additions and 3 deletions
12
app/models/legacy/host_ipaddr_map_history.rb
Normal file
12
app/models/legacy/host_ipaddr_map_history.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
module Legacy
|
||||
class HostIpaddrMapHistory < Db
|
||||
self.table_name = :host_ipaddr_map_history
|
||||
self.primary_key = :id
|
||||
belongs_to :history, foreign_key: :historyid
|
||||
|
||||
def self.at(time)
|
||||
joins(:history).where("(valid_from is null or valid_from <= '#{time.to_s}'::TIMESTAMPTZ)
|
||||
AND (valid_to is null or valid_to >= '#{time}'::TIMESTAMPTZ)")
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue