Story#108521790 - first try to import nameservers

This commit is contained in:
Vladimir Krylov 2015-12-10 17:28:28 +02:00
parent 5f0421af38
commit f6d16f51e9
6 changed files with 119 additions and 3 deletions

View 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