From 53e591b3b6abf40cb11cf707f2479ebf5e471c7e Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 6 Mar 2025 12:33:31 +0300 Subject: [PATCH] [ERP-326] migration --- ...column_status_telegram_to_marketplace_orders_table.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erp24/migrations/m250303_095855_add_column_status_telegram_to_marketplace_orders_table.php b/erp24/migrations/m250303_095855_add_column_status_telegram_to_marketplace_orders_table.php index 3f3fe7ff..91c4e94c 100755 --- a/erp24/migrations/m250303_095855_add_column_status_telegram_to_marketplace_orders_table.php +++ b/erp24/migrations/m250303_095855_add_column_status_telegram_to_marketplace_orders_table.php @@ -22,6 +22,12 @@ class m250303_095855_add_column_status_telegram_to_marketplace_orders_table exte */ public function safeDown() { - $this->dropColumn(self::TABLE_NAME, 'status_telegram'); + if ($this->db->schema->getTableSchema(self::TABLE_NAME) === null) { + return; + } + + if ($this->db->schema->getTableSchema(self::TABLE_NAME)->getColumn('status_telegram') !== null) { + $this->dropColumn(self::TABLE_NAME, 'status_telegram'); + } } } -- 2.39.5