]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-282 Нужно сделать интерфейс настройки магазина
authormarina <m.zozirova@gmail.com>
Tue, 28 Jan 2025 07:16:31 +0000 (10:16 +0300)
committermarina <m.zozirova@gmail.com>
Tue, 28 Jan 2025 07:16:31 +0000 (10:16 +0300)
erp24/migrations/m250128_071505_add_columns_on_city_store.php [new file with mode: 0644]

diff --git a/erp24/migrations/m250128_071505_add_columns_on_city_store.php b/erp24/migrations/m250128_071505_add_columns_on_city_store.php
new file mode 100644 (file)
index 0000000..968f861
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m250128_071505_add_columns_on_city_store
+ */
+class m250128_071505_add_columns_on_city_store extends Migration
+{
+    public function safeUp()
+    {
+        $this->addColumn('erp24.city_store', 'region', $this->integer()->comment('Регион'));
+        $this->addColumn('erp24.city_store', 'city', $this->integer()->comment('Город'));
+        $this->addColumn('erp24.city_store', 'district', $this->integer()->comment('Район'));
+        $this->addColumn('erp24.city_store', 'type', $this->integer()->comment('Тип магазина'));
+    }
+
+    public function safeDown()
+    {
+        $this->dropColumn('erp24.city_store', 'region');
+        $this->dropColumn('erp24.city_store', 'city');
+        $this->dropColumn('erp24.city_store', 'district');
+        $this->dropColumn('erp24.city_store', 'type');
+    }
+}