From 879fdc2d2e3dc0474a4076067b3efbdecd7e0990 Mon Sep 17 00:00:00 2001 From: fomichev Date: Wed, 23 Apr 2025 12:28:31 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D0=BE=D0=BB=D0=B5=20delivery=5Fto=20-=20?= =?utf8?q?=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ..._to_column_to_marketplace_orders_table.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 erp24/migrations/m250423_092430_add_delivery_to_column_to_marketplace_orders_table.php diff --git a/erp24/migrations/m250423_092430_add_delivery_to_column_to_marketplace_orders_table.php b/erp24/migrations/m250423_092430_add_delivery_to_column_to_marketplace_orders_table.php new file mode 100644 index 00000000..48b26611 --- /dev/null +++ b/erp24/migrations/m250423_092430_add_delivery_to_column_to_marketplace_orders_table.php @@ -0,0 +1,39 @@ +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'); + } + } +} -- 2.39.5