diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java index 17d73500..2d47de6b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientConnectionDAOImpl.java @@ -337,9 +337,9 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO { millisecondsNow, data.remoteProctoringRoomId, null, - data.sebMachineName, - data.sebOSName, - data.sebVersion); + Utils.truncateText(data.sebMachineName, 255), + Utils.truncateText(data.sebOSName, 255), + Utils.truncateText(data.sebVersion, 255)); this.clientConnectionRecordMapper.insert(newRecord); return newRecord; @@ -369,9 +369,9 @@ public class ClientConnectionDAOImpl implements ClientConnectionDAO { millisecondsNow, null, null, - data.sebMachineName, - data.sebOSName, - data.sebVersion); + Utils.truncateText(data.sebMachineName, 255), + Utils.truncateText(data.sebOSName, 255), + Utils.truncateText(data.sebVersion, 255)); this.clientConnectionRecordMapper.updateByPrimaryKeySelective(updateRecord); return this.clientConnectionRecordMapper.selectByPrimaryKey(data.id); diff --git a/src/main/resources/config/sql/base/V13__alterTables_v1_3.sql b/src/main/resources/config/sql/base/V13__alterTables_v1_3.sql new file mode 100644 index 00000000..a6004003 --- /dev/null +++ b/src/main/resources/config/sql/base/V13__alterTables_v1_3.sql @@ -0,0 +1,9 @@ +-- ----------------------------------------------------- +-- Alter Table `client_connection` +-- ----------------------------------------------------- + +ALTER TABLE `client_connection` +MODIFY `client_machine_name` VARCHAR(255) NULL, +MODIFY `client_os_name` VARCHAR(255) NULL, +MODIFY `client_version` VARCHAR(255) NULL +; \ No newline at end of file diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 373be9d3..1ec82344 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1646,7 +1646,7 @@ sebserver.examtemplate.list.column.examType.tooltip=The exam type defined by the sebserver.examtemplate.list.column.default=Default Template sebserver.examtemplate.list.column.default.tooltip=Indicates the current default exam template for the institution
{0} sebserver.examtemplate.list.column.default.true=Yes -sebserver.examtemplate.list.column.default.flase=No +sebserver.examtemplate.list.column.default.false=No sebserver.examtemplate.info.pleaseSelect=At first please select an Exam Template from the list diff --git a/src/test/resources/schema-test.sql b/src/test/resources/schema-test.sql index 70316624..b72c79e0 100644 --- a/src/test/resources/schema-test.sql +++ b/src/test/resources/schema-test.sql @@ -129,9 +129,9 @@ CREATE TABLE IF NOT EXISTS `client_connection` ( `update_time` BIGINT UNSIGNED NULL, `remote_proctoring_room_id` BIGINT UNSIGNED NULL, `remote_proctoring_room_update` INT(1) UNSIGNED NULL, - `client_machine_name` VARCHAR(45) NULL, - `client_os_name` VARCHAR(45) NULL, - `client_version` VARCHAR(45) NULL, + `client_machine_name` VARCHAR(255) NULL, + `client_os_name` VARCHAR(255) NULL, + `client_version` VARCHAR(255) NULL, PRIMARY KEY (`id`), INDEX `connection_exam_ref_idx` (`exam_id` ASC), INDEX `clientConnectionInstitutionRef_idx` (`institution_id` ASC),