--- /dev/null
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Handles adding columns to table `{{%marketplace_orders}}`.
+ */
+class m250423_092430_add_delivery_to_column_to_marketplace_orders_table extends Migration
+{
+ const TABLE_NAME = 'erp24.marketplace_orders';
+ /**
+ * {@inheritdoc}
+ */
+ public function safeUp()
+ {
+ $table = $this->db->schema->getTableSchema(self::TABLE_NAME);
+ if ($table === null) {
+ return;
+ }
+
+ if (!$this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('delivery_to')) {
+ $this->addColumn(
+ self::TABLE_NAME,
+ 'delivery_to',
+ $this->text()->null()->comment('Сроки доставки заказа')
+ );
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ if ($this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('delivery_to')) {
+ $this->dropColumn(self::TABLE_NAME, 'delivery_to');
+ }
+ }
+}