]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-85 Реализовать обмен данных с 1С Бухгалтерия
authormarina <m.zozirova@gmail.com>
Mon, 26 Aug 2024 06:24:57 +0000 (09:24 +0300)
committermarina <m.zozirova@gmail.com>
Mon, 26 Aug 2024 06:24:57 +0000 (09:24 +0300)
erp24/migrations/m240826_055119_change_motivation_table.php [new file with mode: 0644]
erp24/migrations/m240826_060227_add_monthly_value_into_motivation_value_group.php [new file with mode: 0644]

diff --git a/erp24/migrations/m240826_055119_change_motivation_table.php b/erp24/migrations/m240826_055119_change_motivation_table.php
new file mode 100644 (file)
index 0000000..1263386
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m240826_055119_change_motivation_table
+ */
+class m240826_055119_change_motivation_table extends Migration
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function safeUp()
+    {
+        $this->addColumn('motivation_costs_items', 'is_weekly', $this->boolean()->comment('Еженедельный сбор'));
+        $this->addColumn('motivation_costs_items', 'is_combined', $this->boolean()->comment('Cбор помесячно из 1С Бух'));
+        $this->addColumn('motivation_costs_items', 'created_by', $this->integer());
+        $this->addColumn('motivation_costs_items', 'updated_by', $this->integer());
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function safeDown()
+    {
+        $this->dropColumn('motivation_costs_items', 'is_weekly');
+        $this->dropColumn('motivation_costs_items', 'is_combined');
+        $this->dropColumn('motivation_costs_items', 'created_by');
+        $this->dropColumn('motivation_costs_items', 'updated_by');
+    }
+}
diff --git a/erp24/migrations/m240826_060227_add_monthly_value_into_motivation_value_group.php b/erp24/migrations/m240826_060227_add_monthly_value_into_motivation_value_group.php
new file mode 100644 (file)
index 0000000..47509d3
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m240826_060227_add_monthly_value_into_motivation_value_group
+ */
+class m240826_060227_add_monthly_value_into_motivation_value_group extends Migration
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function safeUp()
+    {
+        $this->insert('motivation_value_group', [
+            'id' => 10,
+            'name' => 'Месяц',
+            'alias' => 'month'
+        ]);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function safeDown()
+    {
+        $this->delete('motivation_value_group', ['alias' => 'month']);
+    }
+}