add support for Foreign keys in Schema
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7127 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
752cbd0f1a
commit
34a349cae0
@ -456,6 +456,16 @@ sub buildcreatestmt
|
||||
}
|
||||
$retv .= ",\n ";
|
||||
}
|
||||
# if there are foreign keys
|
||||
my $fkey=$descr->{foreignkeys};
|
||||
if ($fkey) {
|
||||
|
||||
$retv .= "FOREIGN KEY ";
|
||||
|
||||
$retv .= $fkey;
|
||||
$retv .= ",\n ";
|
||||
}
|
||||
|
||||
if ($retv =~ /PRIMARY KEY/) {
|
||||
$retv =~ s/,\n $/\n)/;
|
||||
} else {
|
||||
@ -471,9 +481,7 @@ sub buildcreatestmt
|
||||
}
|
||||
$retv =~ s/,$/)\n)/;
|
||||
}
|
||||
#if ($xcatcfg =~ /^DB2:/) { # for DB2 add tablespace
|
||||
# $retv .= " IN XCATTBS16K";
|
||||
#}
|
||||
$retv =~ s/,$/)\n)/;
|
||||
#print "retv=$retv\n";
|
||||
return $retv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user