move updateschema from Table->new to xcatd
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7336 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d3295bc15e
commit
b5b4c667cd
@ -149,14 +149,24 @@ $SIG{PIPE} = sub {
|
||||
};
|
||||
$progname = \$0;
|
||||
|
||||
|
||||
#create and update any xCAt tables
|
||||
#create the user defined external database tables if they do not exist.
|
||||
#update the tables if there are schema changes.
|
||||
# runsqlcmd runs sql scripts provided by the user in
|
||||
# /opt/xcat/lib/perl/xCAT_schema
|
||||
|
||||
if (xCAT::Utils->isMN()) {
|
||||
# update schema for xCAT tables
|
||||
my %int_tabspec;
|
||||
%int_tabspec = xCAT::Table->getTableList;
|
||||
foreach my $tablename (keys %int_tabspec) {
|
||||
my $tablelisttab=xCAT::Table->new($tablename,-create=>1);
|
||||
my $rc= $tablelisttab->updateschema();
|
||||
$tablelisttab->close;
|
||||
}
|
||||
# update schema for user tables
|
||||
xCAT::ExtTab->updateTables();
|
||||
# run any sql commands
|
||||
`$::XCATROOT/sbin/runsqlcmd`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user