initial commit of file from CVS for e-smith-domains on Thu 26 Oct 11:21:08 BST 2023
This commit is contained in:
24
root/etc/e-smith/db/domains/migrate/10sanitise-db
Normal file
24
root/etc/e-smith/db/domains/migrate/10sanitise-db
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
# vim: ft=perl ts=4 sw=4 et:
|
||||
foreach my $domain ( $DB->get_all )
|
||||
{
|
||||
my $lc_key = lc( $domain->key );
|
||||
|
||||
next if ( $lc_key eq $domain->key );
|
||||
|
||||
my $rec = $DB->get($lc_key);
|
||||
|
||||
if ($rec)
|
||||
{
|
||||
warn "DomainsDB: "
|
||||
. $domain->key
|
||||
. " NOT migrated as $lc_key exists\n";
|
||||
next;
|
||||
}
|
||||
|
||||
$rec = $DB->new_record($lc_key);
|
||||
$rec->merge_props( $domain->props );
|
||||
|
||||
$domain->delete;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user