From 38ceaf4b1424bb7a06b69f40dfb73bed1297877b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Krzy=C5=BCanowski?= Date: Sat, 18 Mar 2023 15:55:39 +0100 Subject: [PATCH] Image paths can now include capital letters --- migrations/20230318002626_initial.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/20230318002626_initial.js b/migrations/20230318002626_initial.js index 6c9b6ad..15828fe 100644 --- a/migrations/20230318002626_initial.js +++ b/migrations/20230318002626_initial.js @@ -16,7 +16,7 @@ exports.up = function(knex) { .notNullable(); table.string('image_path') .notNullable() - .checkRegex('^([0-9a-z_]+/{0,1})*[0-9a-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); + .checkRegex('^([0-9A-Za-z_]+/{0,1})*[0-9A-Za-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); table.integer('osp_unit_id') .unsigned() .notNullable() @@ -27,7 +27,7 @@ exports.up = function(knex) { table.increments(); table.string('image_path') .notNullable() - .checkRegex('^([0-9a-z_]+/{0,1})*[0-9a-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); + .checkRegex('^([0-9A-Za-z_]+/{0,1})*[0-9A-Za-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); table.integer('ordinal_number') .notNullable(); table.integer('fire_truck_id')