[freeside-commits] freeside/FS/bin freeside-upgrade,1.40,1.41
Mark Wells
mark at wavetail.420.am
Sat Oct 2 13:54:29 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv25216/FS/bin
Modified Files:
freeside-upgrade
Log Message:
mandatory custom field flag, RT#9260
Index: freeside-upgrade
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-upgrade,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -w -d -r1.40 -r1.41
--- freeside-upgrade 19 Sep 2010 05:50:28 -0000 1.40
+++ freeside-upgrade 2 Oct 2010 20:54:27 -0000 1.41
@@ -71,6 +71,21 @@
}
+# RT required field flag
+# for consistency with RT schema: mysql is in CamelCase,
+# pg is in lowercase, and they use different data types.
+my ($t, $creq, $cdis) =
+ map { driver_name =~ /^mysql/i ? $_ : lc($_) }
+ ('CustomFields','Required','Disabled');
+
+if ( dbdef->table($t) &&
+ ! dbdef->table($t)->column($creq) ) {
+ push @bugfix,
+ "ALTER TABLE $t ADD COLUMN $creq ".
+ dbdef->table($t)->column($cdis)->type .
+ ' NOT NULL DEFAULT 0';
+}
+
if ( $DRY_RUN ) {
print
join(";\n", @bugfix ). ";\n";
More information about the freeside-commits
mailing list