[Rt-commit] rt branch, 4.0/upgrading-basedon, created. rt-4.0.0-236-g69da6ca
Kevin Falcone
falcone at bestpractical.com
Tue May 10 13:49:31 EDT 2011
The branch, 4.0/upgrading-basedon has been created
at 69da6caaac112c10b891f3b8a82050a20e146980 (commit)
- Log -----------------------------------------------------------------
commit 69da6caaac112c10b891f3b8a82050a20e146980
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue May 10 13:47:22 2011 -0400
Revert "Oracle needs TO_NUMBER to store clob in number column"
This reverts commit ec0ef6c832497ad76da972e4f499fcd7eb371799.
BasedOn can have multiple duplicate Attributes (#17356) which means this
SQL needs to have a LIMIT 1 (or the oracle equivalent which is too long
to fit in this commit message).
Instead, since BasedOn is a special column, we'll delete all the
database specific logic and just use perl, like the other 2 parts of the
upgrade script.
diff --git a/etc/upgrade/3.9.7/content b/etc/upgrade/3.9.7/content
index f8073ed..9dfb114 100644
--- a/etc/upgrade/3.9.7/content
+++ b/etc/upgrade/3.9.7/content
@@ -1,16 +1,7 @@
-my %number_column = (
- BasedOn => 1,
-);
my $move_attributes = sub {
my ($table, $type, $column) = @_;
- my $query;
- if ( $number_column{ $column } && RT->Config->Get('DatabaseType') eq 'Oracle' ) {
- $query = "UPDATE $table SET $column = (SELECT TO_NUMBER(Content) FROM Attributes WHERE"
- ." Name = ? AND ObjectType = ? AND $table.id = Attributes.ObjectId)";
- } else {
- $query = "UPDATE $table SET $column = (SELECT Content FROM Attributes WHERE"
- ." Name = ? AND ObjectType = ? AND $table.id = Attributes.ObjectId)";
- }
+ my $query = "UPDATE $table SET $column = (SELECT Content FROM Attributes WHERE"
+ ." Name = ? AND ObjectType = ? AND $table.id = Attributes.ObjectId)";
my $res = $RT::Handle->SimpleQuery( $query, $column, $type );
unless ( $res ) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list