]> 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:43:00 +0000 (17:43 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 23 Sep 2013 15:43:00 +0000 (17:43 +0200)
r=LpSolit a=justdave

Bugzilla/DB/Schema/Oracle.pm

index 381906d2e0e67a72e6d1ecda1c7c052e3151e29c..a9792972636014bbe81f7582c09aa73d7e94f08a 100644 (file)
@@ -204,6 +204,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;