From 515e04d1e3bf14934b2405c905da762db071dfb0 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Wed, 14 Jan 2026 14:00:42 +0100 Subject: [PATCH] feat(accident): update accident field type and enhance textarea styling - Changed the accident field type from STRING to TEXT in the Accident model to accommodate larger input. - Increased the minimum height of the textarea in AccidentFormDialog and added font styling for improved readability. --- backend/migrations/20260107_change_accident_to_text.sql | 3 +++ backend/models/Accident.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 backend/migrations/20260107_change_accident_to_text.sql diff --git a/backend/migrations/20260107_change_accident_to_text.sql b/backend/migrations/20260107_change_accident_to_text.sql new file mode 100644 index 0000000..0dd3ee8 --- /dev/null +++ b/backend/migrations/20260107_change_accident_to_text.sql @@ -0,0 +1,3 @@ +-- Change accident field from VARCHAR to TEXT to allow longer descriptions +ALTER TABLE `accident` + MODIFY COLUMN `accident` TEXT NOT NULL; diff --git a/backend/models/Accident.js b/backend/models/Accident.js index b007b1f..f1ec10a 100644 --- a/backend/models/Accident.js +++ b/backend/models/Accident.js @@ -13,7 +13,7 @@ const Accident = sequelize.define('Accident', { allowNull: false, }, accident: { - type: DataTypes.STRING, + type: DataTypes.TEXT, allowNull: false, set(value) { const encryptedValue = encryptData(value);