From: Dan Wells Date: Fri, 30 Mar 2012 19:55:19 +0000 (-0400) Subject: Simplify serial.materialized_holding_code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=05e7270afeace61544059e05facbf51b710e99ce;p=contrib%2FConifer.git Simplify serial.materialized_holding_code Attempting to materialize holding_type and ind1/ind2 for less than perfect data causes problems. Since we aren't actually using this data, let's get rid of these fields. Signed-off-by: Dan Wells Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial-holding-groups.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial-holding-groups.sql index d395430f8e..695ce81012 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial-holding-groups.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial-holding-groups.sql @@ -70,9 +70,6 @@ $$ LANGUAGE SQL STABLE; CREATE TABLE serial.materialized_holding_code ( id BIGSERIAL PRIMARY KEY, issuance INTEGER NOT NULL REFERENCES serial.issuance (id) ON DELETE CASCADE, - holding_type TEXT NOT NULL, - ind1 TEXT, - ind2 TEXT, subfield CHAR, value TEXT ); @@ -110,18 +107,15 @@ spi_exec_prepared($dstmt, $_TD->{new}{id}); my $istmt = spi_prepare( q{ INSERT INTO serial.materialized_holding_code ( - issuance, holding_type, ind1, ind2, subfield, value - ) VALUES ($1, $2, $3, $4, $5, $6) - }, qw{INT TEXT TEXT TEXT CHAR TEXT} + issuance, subfield, value + ) VALUES ($1, $2, $3) + }, qw{INT CHAR TEXT} ); foreach ($field->subfields) { spi_exec_prepared( $istmt, $_TD->{new}{id}, - $_TD->{new}{holding_type}, - $field->indicator(1), - $field->indicator(2), $_->[0], $_->[1] );