]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
миграция salary_shift не обязательна
authorAlexander Smirnov <fredeom@mail.ru>
Wed, 9 Oct 2024 12:12:01 +0000 (15:12 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Wed, 9 Oct 2024 12:12:01 +0000 (15:12 +0300)
erp24/migrations/m241009_120723_alter_column_salary_shift.php [new file with mode: 0755]

diff --git a/erp24/migrations/m241009_120723_alter_column_salary_shift.php b/erp24/migrations/m241009_120723_alter_column_salary_shift.php
new file mode 100755 (executable)
index 0000000..c0dc73a
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m241009_120723_alter_column_salary_shift
+ */
+class m241009_120723_alter_column_salary_shift extends Migration
+{
+    const TABLE_NAME='employee_on_shift';
+    /**
+     * {@inheritdoc}
+     */
+    public function safeUp()
+    {
+        $this->alterColumn(self::TABLE_NAME, 'salary_shift', $this->integer()->null()->comment('оплата за смену'));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function safeDown()
+    {
+        $this->alterColumn(self::TABLE_NAME, 'salary_shift', $this->integer()->notNull()->comment('оплата за смену'));
+    }
+}