From 38c3105619d0d0a94187f530db6f189fa6ba8342 Mon Sep 17 00:00:00 2001 From: xsalonx Date: Tue, 12 Mar 2024 14:00:18 +0100 Subject: [PATCH] varchar length --- .../20240226102034-create-quality-control-flags-tables.js | 2 +- lib/database/models/qcFlagType.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/database/migrations/20240226102034-create-quality-control-flags-tables.js b/lib/database/migrations/20240226102034-create-quality-control-flags-tables.js index e69c6d500f..23c75c0559 100644 --- a/lib/database/migrations/20240226102034-create-quality-control-flags-tables.js +++ b/lib/database/migrations/20240226102034-create-quality-control-flags-tables.js @@ -26,7 +26,7 @@ module.exports = { allowNull: false, }, color: { - type: Sequelize.STRING, + type: Sequelize.STRING(7), allowNull: true, }, diff --git a/lib/database/models/qcFlagType.js b/lib/database/models/qcFlagType.js index 3afff34ef3..525057da9f 100644 --- a/lib/database/models/qcFlagType.js +++ b/lib/database/models/qcFlagType.js @@ -38,7 +38,7 @@ module.exports = (sequelize) => { allowNull: false, }, color: { - type: Sequelize.STRING, + type: Sequelize.STRING(7), allowNull: true, validate: { is: /^#[0-9a-fA-F]{6}$/i,