--- /dev/null
+<?php
+
+use yii\db\Migration;
+
+class m241126_064206_add_new_column_on_shift_remains extends Migration
+{
+ public function safeUp()
+ {
+ $this->addColumn('shift_remains', 'type', $this->integer()->notNull()->defaultValue(1)->comment('Тип записи'));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ $this->dropColumn('shift_remains', 'type');
+ }
+}
--- /dev/null
+<?php
+
+use yii\db\Migration;
+
+/**
+ * Class m241127_065457_create_equalization_remains_table
+ */
+class m241127_065457_create_equalization_remains_table extends Migration
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function safeUp()
+ {
+ $this->createTable('erp24.equalization_remains', [
+ 'id' => $this->primaryKey()->comment('ID записи'),
+ 'shift_id' => $this->integer()->comment('ID записи передачи смены'),
+ 'product_id' => $this->string()->comment('ID товара с недостатком'),
+ 'product_count' => $this->float()->comment('Количество товара с недостатком'),
+ 'product_price' => $this->float()->comment('Цена товара розничная'),
+ 'product_price_seft_cost' => $this->float()->comment('Себестоимость товара'),
+ 'product_replacement_id' => $this->string()->comment('Товар замена'),
+ 'product_replacement_count' => $this->float()->comment('Количество товара замены'),
+ 'product_replacement_price' => $this->float()->comment('Цена товара замены розничная'),
+ 'product_replacement_price_seft_cost' => $this->float()->comment('Себестоимость товара замены'),
+ 'balance' => $this->float()->comment('Разница в сумме'),
+ 'created_at' => $this->dateTime()->comment('Дата создания записи'),
+ 'updated_at' => $this->dateTime()->comment('Дата обновления записи'),
+ 'created_by' => $this->integer()->comment('Автор создания записи'),
+ 'updated_by' => $this->integer()->comment('Автор обновления записи'),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ $this->dropTable('equalization_remains');
+ }
+}