$max['groupid'] + 1]); } $ret = Database::exec("INSERT IGNORE INTO remoteaccess_x_location (groupid, locationid) SELECT locationid, locationid FROM remoteaccess_location"); if ($ret === false) { finalResponse(UPDATE_FAILED, Database::lastError()); } Database::exec("DROP TABLE remoteaccess_location"); } // 2021-03-05: Add vncport column to machine table if (!tableHasColumn('remoteaccess_machine', 'vncport')) { $ret = Database::exec("ALTER TABLE remoteaccess_machine ADD COLUMN `vncport` smallint(5) UNSIGNED NOT NULL DEFAULT '5900'"); if ($ret === false) { finalResponse(UPDATE_FAILED, Database::lastError()); } $dbret[] = UPDATE_DONE; } // 2021-08-21: Add Columns for reserving clients if (!tablehasColumn('remoteaccess_machine', 'lectureid')) { $ret = Database::exec("ALTER TABLE remoteaccess_machine ADD COLUMN `lectureid` char(36)"); if ($ret === false) { finalResponse(UPDATE_FAILED, DATABASE::lastError()); } $dbret[] = UPDATE_DONE; } // 2021-08-21: Timestamp to see when the client was reserved (timeout) if (!tablehasColumn('remoteaccess_machine', 'timestamp')) { $ret = Database::exec("ALTER TABLE remoteaccess_machine ADD COLUMN `timestamp` int unsigned"); if ($ret === false) { finalResponse(UPDATE_FAILED, DATABASE::lastError()); } $dbret[] = UPDATE_DONE; } // 2021-11-27: Add column for an edit session id if (!tablehasColumn('remoteaccess_machine', 'editid')) { $ret = Database::exec("ALTER TABLE remoteaccess_machine ADD COLUMN `editid` char(36)"); if ($ret === false) { finalResponse(UPDATE_FAILED, DATABASE::lastError()); } $dbret[] = UPDATE_DONE; } responseFromArray($dbret);