This avoids an exception per class during class loading. For FirewallsPrivateSubnets and CertsLoadBalancers, this defines a ubid_type method when one was previously not defined. This method isn't used, since these models do not have an id field currently. I'm guessing these models only use ResourceMethods for the before_destroy hook, so potentially, that could be moved to a separate module, or we could use a trigger approach to updating the archive table instead of a model hook approach.
22 lines
589 B
Ruby
22 lines
589 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../model"
|
|
|
|
class GloballyBlockedDnsname < Sequel::Model
|
|
def self.ubid_type
|
|
UBID::TYPE_ETC
|
|
end
|
|
|
|
include ResourceMethods
|
|
end
|
|
|
|
# Table: globally_blocked_dnsname
|
|
# Columns:
|
|
# id | uuid | PRIMARY KEY
|
|
# dns_name | text | NOT NULL
|
|
# ip_list | inet[] |
|
|
# last_check_at | timestamp without time zone |
|
|
# Indexes:
|
|
# globally_blocked_dnsname_pkey | PRIMARY KEY btree (id)
|
|
# globally_blocked_dnsname_dns_name_key | UNIQUE btree (dns_name)
|