From c6878b77482a6afb4914b0369c6649ed8cf9346d Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Tue, 12 Nov 2024 10:41:29 +0100 Subject: [PATCH] Added the update queries to fix possible nullable values of the object categories. --- migrations/db/20230901112005_fix_positions_cleanup_db.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migrations/db/20230901112005_fix_positions_cleanup_db.php b/migrations/db/20230901112005_fix_positions_cleanup_db.php index 87cb557e..5cbeb32e 100644 --- a/migrations/db/20230901112005_fix_positions_cleanup_db.php +++ b/migrations/db/20230901112005_fix_positions_cleanup_db.php @@ -279,6 +279,9 @@ public function change() ->dropForeignKey('anr_id') ->removeColumn('anr_id') ->save(); + $this->execute('UPDATE objects_categories SET label2 = "" WHERE label2 IS NULL'); + $this->execute('UPDATE objects_categories SET label3 = "" WHERE label3 IS NULL'); + $this->execute('UPDATE objects_categories SET label4 = "" WHERE label4 IS NULL'); $this->table('objects_categories') ->dropForeignKey('anr_id') ->removeColumn('anr_id')