summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xFS/bin/freeside-upgrade15
-rw-r--r--rt/FREESIDE_MODIFIED3
-rwxr-xr-xrt/etc/schema.mysql-4.11
3 files changed, 18 insertions, 1 deletions
diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade
index d3723a1..aca545b 100755
--- a/FS/bin/freeside-upgrade
+++ b/FS/bin/freeside-upgrade
@@ -71,6 +71,21 @@ if ( dbdef->table('cgp_rule_condition') &&
}
+# 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";
diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED
index d73a5e0..45a6106 100644
--- a/rt/FREESIDE_MODIFIED
+++ b/rt/FREESIDE_MODIFIED
@@ -5,9 +5,10 @@ config.layout.in
etc/RT_Config.pm
etc/RT_SiteConfig.pm
etc/schema.Pg
+ etc/schema.mysql-4.1
lib/RT/Config.pm
-lib/RT?CustomField.pm #CheckMandatoryFields
+lib/RT/CustomField.pm #CheckMandatoryFields
lib/RT/CustomField_Overlay.pm #customfield date patch
lib/RT/Interface/Web.pm #customfield date patch
lib/RT/Interface/Web_Vendor.pm
diff --git a/rt/etc/schema.mysql-4.1 b/rt/etc/schema.mysql-4.1
index 172e477..1735702 100755
--- a/rt/etc/schema.mysql-4.1
+++ b/rt/etc/schema.mysql-4.1
@@ -386,6 +386,7 @@ CREATE TABLE CustomFields (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
+ Required int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
) TYPE=InnoDB CHARACTER SET utf8;