From: Alexander Smirnov Date: Thu, 6 Mar 2025 09:33:31 +0000 (+0300) Subject: [ERP-326] migration X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=53e591b3b6abf40cb11cf707f2479ebf5e471c7e;p=erp24_rep%2Fyii-erp24%2F.git [ERP-326] migration --- 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'); + } } }