[open-ils-commits] r18563 - branches/rel_1_6/Open-ILS/src/sql/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 1 16:59:07 EDT 2010
Author: miker
Date: 2010-11-01 16:59:01 -0400 (Mon, 01 Nov 2010)
New Revision: 18563
Modified:
branches/rel_1_6/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
branches/rel_1_6/Open-ILS/src/sql/Pg/1.6.1-1.6.2-upgrade-db.sql
Log:
Backporting r18561 from trunk: Make vandelay.add_field smarter about applying add rules when no target field exists before hand
Modified: branches/rel_1_6/Open-ILS/src/sql/Pg/012.schema.vandelay.sql
===================================================================
--- branches/rel_1_6/Open-ILS/src/sql/Pg/012.schema.vandelay.sql 2010-11-01 20:55:02 UTC (rev 18562)
+++ branches/rel_1_6/Open-ILS/src/sql/Pg/012.schema.vandelay.sql 2010-11-01 20:59:01 UTC (rev 18563)
@@ -232,6 +232,7 @@
for my $from_field ($source_r->field( $f )) {
my @tos = $target_r->field( $f );
if (!@tos) {
+ next if (exists($fields{$f}{match}));
my @new_fields = map { $_->clone } $source_r->field( $f );
$target_r->insert_fields_ordered( @new_fields );
} else {
Modified: branches/rel_1_6/Open-ILS/src/sql/Pg/1.6.1-1.6.2-upgrade-db.sql
===================================================================
--- branches/rel_1_6/Open-ILS/src/sql/Pg/1.6.1-1.6.2-upgrade-db.sql 2010-11-01 20:55:02 UTC (rev 18562)
+++ branches/rel_1_6/Open-ILS/src/sql/Pg/1.6.1-1.6.2-upgrade-db.sql 2010-11-01 20:59:01 UTC (rev 18563)
@@ -171,6 +171,7 @@
for my $from_field ($source_r->field( $f )) {
my @tos = $target_r->field( $f );
if (!@tos) {
+ next if (exists($fields{$f}{match}));
my @new_fields = map { $_->clone } $source_r->field( $f );
$target_r->insert_fields_ordered( @new_fields );
} else {
More information about the open-ils-commits
mailing list