+sub search_sql {
+ my ($class, $string) = @_;
+ my @where = ();
+ push @where, 'LOWER(svc_circuit.circuit_id) = LOWER(' . dbh->quote($string) . ')';
+ push @where, 'LOWER(circuit_provider.provider) = LOWER(' . dbh->quote($string) . ')';
+ push @where, 'LOWER(circuit_type.typename) = LOWER(' . dbh->quote($string) . ')';
+ '(' . join(' OR ', @where) . ')';
+}
+
+sub search_sql_addl_from {
+ 'LEFT JOIN circuit_provider USING ( providernum ) '.
+ 'LEFT JOIN circuit_type USING ( typenum )';
+}
+
+sub _upgrade_data {
+
+ require FS::Misc::FixIPFormat;
+ FS::Misc::FixIPFormat::fix_bad_addresses_in_table(
+ 'svc_circuit', 'svcnum', 'endpoint_ip_addr',
+ );
+
+ '';
+
+}
+