fixed sql import
This commit is contained in:
parent
00139e31fe
commit
48e645f14a
|
@ -34,7 +34,6 @@ binmode($OUT_ACRONYMS, ":utf8");
|
||||||
binmode($OUT_RELS, ":utf8");
|
binmode($OUT_RELS, ":utf8");
|
||||||
binmode($OUT_URLS, ":utf8");
|
binmode($OUT_URLS, ":utf8");
|
||||||
|
|
||||||
|
|
||||||
foreach my $record (@$data) {
|
foreach my $record (@$data) {
|
||||||
my $id = 'tmp::' . md5_hex($record->{'id'});
|
my $id = 'tmp::' . md5_hex($record->{'id'});
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
||||||
DELETE FROM oa_conflicts WHERE created_by = 'dedupWf' and reltype = 'suggested';
|
DELETE FROM oa_conflicts WHERE created_by = 'dedupWf' and modified_by = 'dedupWf' and reltype = 'suggested';
|
||||||
DELETE FROM oa_duplicates WHERE created_by = 'dedupWf' and reltype = 'suggested';
|
DELETE FROM oa_duplicates WHERE created_by = 'dedupWf' and modified_by = 'dedupWf' and reltype = 'suggested';
|
||||||
DELETE FROM organizations WHERE created_by = 'dedupWf' and modified_by = 'dedupWf';
|
DELETE FROM organizations WHERE created_by = 'dedupWf' and modified_by = 'dedupWf' and status = 'suggested';
|
||||||
|
|
||||||
-- FIX ORIGINAL DATA
|
-- FIX ORIGINAL DATA
|
||||||
UPDATE organizations SET id = 'pending_org_::'||MD5(id) WHERE status = 'suggested' AND id NOT LIKE 'pending_org_::%';
|
UPDATE organizations SET id = 'pending_org_::'||MD5(id) WHERE status = 'suggested' AND id NOT LIKE 'pending_org_::%';
|
||||||
|
|
Loading…
Reference in New Issue