From 9dea35edc205f0c4a78c7f32af30078b5b19bdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Krzy=C5=BCanowski?= Date: Sat, 18 Mar 2023 15:46:30 +0100 Subject: [PATCH] Repaired fire_truck and truck_side img_path constraints --- 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 7f249de..6c9b6ad 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-9a-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); + .checkRegex('^([0-9a-z_]+/{0,1})*[0-9a-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-9a-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); + .checkRegex('^([0-9a-z_]+/{0,1})*[0-9a-z_]+\.((png)|(jpg)|(jpeg)|(webp))$'); table.integer('ordinal_number') .notNullable(); table.integer('fire_truck_id')