From ddd1a625849f23ac4ff017b535d5ebf9173413f2 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 16 Feb 2011 20:20:46 +0000 Subject: [PATCH] Not setting Not Null for required attributes in DB2 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8861 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 5a88a3aab..9f4a65fcc 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -453,6 +453,10 @@ sub buildcreatestmt # will have already put in NOT NULL, if DB2 and a key if (!($xcatcfg =~ /^DB2:/)){ # not a db2 key $retv .= " NOT NULL"; + } else { # is DB2 + if (!(isAKey(\@{$descr->{keys}}, $col))) { # not a key + $retv .= " NOT NULL"; + } } } $retv .= ",\n ";