]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-326] migration
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 6 Mar 2025 09:33:31 +0000 (12:33 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 6 Mar 2025 09:33:31 +0000 (12:33 +0300)
erp24/migrations/m250303_095855_add_column_status_telegram_to_marketplace_orders_table.php

index 3f3fe7ffc151e579309dffdda157b74f37401ca9..91c4e94c0aa33e5b7fd92aeb3b021b09263ab9ac 100755 (executable)
@@ -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');
+        }
     }
 }