Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / etc / upgrade / 3.9.5 / backcompat
index 611ab51..ca0b289 100644 (file)
@@ -1 +1,15 @@
-RT::ACE                LastUpdated LastUpdatedBy Creator Created
+my ($upgrade) = @_;
+
+my %removed;
+my @fields = qw/LastUpdated LastUpdatedBy Creator Created/;
+
+RT::ACE->_BuildTableAttributes;
+$RT::Logger->debug("Temporarily removing @fields from RT::ACE");
+$removed{$_} = delete $RT::Record::_TABLE_ATTR->{"RT::ACE"}{$_}
+    for @fields;
+
+$upgrade->();
+
+# Put back the fields we chopped off
+$RT::Record::_TABLE_ATTR->{"RT::ACE"}{$_} = $removed{$_}
+    for @fields;