partially fix some old update tools

This commit is contained in:
Uwe Steinmann 2022-09-08 17:50:01 +02:00
parent 2eeb3771ee
commit 64f75009bf
6 changed files with 165 additions and 171 deletions

View File

@ -119,6 +119,5 @@ if (!update_db()) {
print "<b>Update done</b><br>"; print "<b>Update done</b><br>";
print "</body></html>"; print "</body></html>";
?>

View File

@ -19,7 +19,7 @@ CREATE TABLE `tblDocumentFiles` (
`fileType` varchar(10) NOT NULL default '', `fileType` varchar(10) NOT NULL default '',
`mimeType` varchar(70) NOT NULL default '', `mimeType` varchar(70) NOT NULL default '',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ; ) Engine=MyISAM ;
-- -------------------------------------------------------- -- --------------------------------------------------------

View File

@ -68,6 +68,5 @@ if (!update_db()) {
}else print "</pre><b>Update done</b><br>"; }else print "</pre><b>Update done</b><br>";
print "</body></html>"; print "</body></html>";
?>

View File

@ -24,7 +24,7 @@ CREATE TABLE `tblMandatoryReviewers` (
`reviewerUserID` int(11) NOT NULL default '0', `reviewerUserID` int(11) NOT NULL default '0',
`reviewerGroupID` int(11) NOT NULL default '0', `reviewerGroupID` int(11) NOT NULL default '0',
PRIMARY KEY (`userID`,`reviewerUserID`,`reviewerGroupID`) PRIMARY KEY (`userID`,`reviewerUserID`,`reviewerGroupID`)
) ; ) Engine=MyISAM ;
-- --
-- Table structure for mandatory approvers -- Table structure for mandatory approvers
@ -35,4 +35,4 @@ CREATE TABLE `tblMandatoryApprovers` (
`approverUserID` int(11) NOT NULL default '0', `approverUserID` int(11) NOT NULL default '0',
`approverGroupID` int(11) NOT NULL default '0', `approverGroupID` int(11) NOT NULL default '0',
PRIMARY KEY (`userID`,`approverUserID`,`approverGroupID`) PRIMARY KEY (`userID`,`approverUserID`,`approverGroupID`)
) ; ) Engine=MyISAM ;

View File

@ -68,6 +68,4 @@ if (!update_db()) {
}else print "</pre><b>Update done</b><br>"; }else print "</pre><b>Update done</b><br>";
print "</body></html>"; print "</body></html>";
?>

View File

@ -20,9 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
function check($doupdate=0) { /* {{{ */ function check($db, $doupdate=0) { /* {{{ */
global $db, $settings;
$arr = array(); $arr = array();
$arr['tblDocuments'] = array('key'=>'id', 'fields'=>array('name', 'comment', 'keywords')); $arr['tblDocuments'] = array('key'=>'id', 'fields'=>array('name', 'comment', 'keywords'));
$arr['tblDocumentFiles'] = array('key'=>'id', 'fields'=>array('name', 'comment', 'mimeType')); $arr['tblDocumentFiles'] = array('key'=>'id', 'fields'=>array('name', 'comment', 'mimeType'));
@ -91,7 +89,7 @@ else
$doupdate = 0; $doupdate = 0;
$doupdate = 1; $doupdate = 1;
if (!check($doupdate)) { if (!check($db, $doupdate)) {
print "<p>Update failed</p>"; print "<p>Update failed</p>";
} }