]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 919475: [Oracle] Crash when non-mandatory free text custom fields are left empty...
authorJiří Netolický <netolish@netolish.cz>
Mon, 23 Sep 2013 15:44:20 +0000 (17:44 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 23 Sep 2013 15:44:20 +0000 (17:44 +0200)
r=LpSolit a=justdave

Bugzilla/DB/Schema/Oracle.pm

index 9fafc4515e405000f6cd6056c6da4d90c3dc3b52..a61b1e3238b36b727f8780b97296c686759b53b4 100644 (file)
@@ -219,6 +219,10 @@ sub get_add_column_ddl {
     }
     else {
         @sql = $self->SUPER::get_add_column_ddl(@_);
+        # Create triggers to deal with empty string. 
+        if ($definition->{TYPE} =~ /varchar|TEXT/i && $definition->{NOTNULL}) {
+            push(@sql, _get_notnull_trigger_ddl($table, $column));
+        }
     }
 
     return @sql;