add foreign key stanza

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7103 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-08-16 20:08:47 +00:00
parent 6b88d50446
commit fb2648f066

View File

@ -15,7 +15,7 @@ package xCAT_schema::Sample;
# Please do not use SQL reserved words for your table names and column names.
# Use this site to check the reserved words:
# http://www.petefreitag.com/tools/sql_reserved_words_checker/
# 5 Change the keys.
# 5 Change the keys. Foreign keys are optional
# 6 Change the data types. For SQLite
# the default data type is TEXT if not specified.
# The supported data types are:
@ -34,6 +34,7 @@ package xCAT_schema::Sample;
x_lljob => { #your table name should start with "x_".
cols => [qw(jobid status comments disable)], #do not change 'disable' and 'comments', it is required by xCAT
keys => [qw(jobid)],
keys => [qw(jobid)],
required => [qw(jobid)],
types => {
jobid => 'INTEGER',
@ -49,6 +50,7 @@ package xCAT_schema::Sample;
x_llnode => {
cols => [qw(node jobid jobstatus cpu_usage comments disable)],
keys => [qw(node)],
foreignkeys => [qw(node) REFERENCES x_lljob(node) ON DELETE CASCADE)],
required => [qw(node jobid)],
types => {
jobid => 'INTEGER',