X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=sql%2Fbase%2Fbase.sql;h=a333a1b3e4bd31b8bd2bae4956e9d88a7ba57dd3;hp=e7096d408abc940777653a7918f91835e1ce8d83;hb=46bd95616923cd2de0b1ed6b7a0fd8ffd0b103e2;hpb=c345f1df91b1351d903c3cdcc046f7d7f64d8f87 diff --git a/sql/base/base.sql b/sql/base/base.sql index e7096d4..a333a1b 100644 --- a/sql/base/base.sql +++ b/sql/base/base.sql @@ -2696,6 +2696,22 @@ CREATE OR REPLACE FUNCTION migration_tools.duplicate_templates (INTEGER, INTEGER END; $$ LANGUAGE PLPGSQL STRICT VOLATILE; +CREATE OR REPLACE FUNCTION migration_tools.reset_event (BIGINT) RETURNS VOID AS $$ + UPDATE + action_trigger.event + SET + start_time = NULL + ,update_time = NULL + ,complete_time = NULL + ,update_process = NULL + ,state = 'pending' + ,template_output = NULL + ,error_output = NULL + ,async_output = NULL + WHERE + id = $1; +$$ LANGUAGE SQL; + CREATE OR REPLACE FUNCTION migration_tools.get_marc_leader (TEXT) RETURNS TEXT AS $$ my ($marcxml) = @_; @@ -3517,7 +3533,7 @@ foreach my $field (@uris) { if (!defined $ind2) { next; } if ($ind2 ne '0') { next; } if (!defined $sfu) { next; } - if ($sfu =~ m/$matching_u_text/) { + if ($sfu =~ m/$matching_u_text/ or $matching_u_text eq 'pineapple') { $field->add_subfields( '9' => $new_9_to_set ); last; }