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

Bugzilla/DB/Schema/Oracle.pm

index 1bed5b5cad7de33d9e16ea38edf44dcb515ecce0..1554a0fe198641e6e06969e48ebf9f104be526f5 100644 (file)
@@ -205,6 +205,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;