diff options
Diffstat (limited to 'config-db/OpenSLX/MetaDB/mysql.pm')
-rw-r--r-- | config-db/OpenSLX/MetaDB/mysql.pm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/config-db/OpenSLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm index 25cc93a8..eb6f9551 100644 --- a/config-db/OpenSLX/MetaDB/mysql.pm +++ b/config-db/OpenSLX/MetaDB/mysql.pm @@ -48,7 +48,7 @@ sub connect $dbSpec = "database=$openslxConfig{'db-name'}"; } my $user = (getpwuid($>))[0]; - vlog 1, "trying to connect user <$user> to mysql-database <$dbSpec>"; + vlog(1, "trying to connect user <$user> to mysql-database <$dbSpec>"); $self->{'dbh'} = DBI->connect("dbi:mysql:$dbSpec", $user, '', {PrintError => 0}) or die _tr("Cannot connect to database <%s> (%s)", @@ -84,9 +84,9 @@ sub schemaRenameTable my $isSubCmd = shift; my $dbh = $self->{'dbh'}; - vlog 1, "renaming table <$oldTable> to <$newTable>..." unless $isSubCmd; + vlog(1, "renaming table <$oldTable> to <$newTable>..." unless $isSubCmd); my $sql = "ALTER TABLE $oldTable RENAME TO $newTable"; - vlog 3, $sql; + vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't rename table <%s> (%s)], $oldTable, $dbh->errstr); } @@ -102,7 +102,7 @@ sub schemaAddColumns my $dbh = $self->{'dbh'}; my $newColNames = $self->_convertColDescrsToColNamesString($newColDescrs); - vlog 1, "adding columns <$newColNames> to table <$table>" unless $isSubCmd; + vlog(1, "adding columns <$newColNames> to table <$table>" unless $isSubCmd); my $addClause = join ', ', map { @@ -111,7 +111,7 @@ sub schemaAddColumns } @$newColDescrs; my $sql = "ALTER TABLE $table $addClause"; - vlog 3, $sql; + vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't add columns to table <%s> (%s)], $table, $dbh->errstr); @@ -131,11 +131,11 @@ sub schemaDropColumns my $dbh = $self->{'dbh'}; my $dropColStr = join ', ', @$dropColNames; - vlog 1, "dropping columns <$dropColStr> from table <$table>..." - unless $isSubCmd; + vlog(1, "dropping columns <$dropColStr> from table <$table>..." + unless $isSubCmd); my $dropClause = join ', ', map { "DROP COLUMN $_" } @$dropColNames; my $sql = "ALTER TABLE $table $dropClause"; - vlog 3, $sql; + vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't drop columns from table <%s> (%s)], $table, $dbh->errstr); @@ -151,8 +151,8 @@ sub schemaChangeColumns my $dbh = $self->{'dbh'}; my $changeColStr = join ', ', keys %$colChanges; - vlog 1, "changing columns <$changeColStr> in table <$table>..." - unless $isSubCmd; + vlog(1, "changing columns <$changeColStr> in table <$table>..." + unless $isSubCmd); my $changeClause = join ', ', map { @@ -161,7 +161,7 @@ sub schemaChangeColumns } keys %$colChanges; my $sql = "ALTER TABLE $table $changeClause"; - vlog 3, $sql; + vlog(3, $sql); $dbh->do($sql) or confess _tr(q[Can't change columns in table <%s> (%s)], $table, $dbh->errstr); |