+++ /dev/null
-<?php
-
-use yii\db\Migration;
-
-/**
- * Class m241126_152940_add_fields_to_products_1c
- */
-class m241126_152940_add_fields_to_products_1c extends Migration
-{
-
- const TABLE_NAME = 'erp24.products_1c';
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->addColumn(self::TABLE_NAME, 'product_type', $this->string()->null()->comment('Вид номенклатуры'));
- $this->addColumn(self::TABLE_NAME, 'country_of_origin', $this->string()->null()->comment('Страна происхождения'));
- $this->addColumn(self::TABLE_NAME, 'manufacturer', $this->string()->null()->comment('Производитель'));
- $this->addColumn(self::TABLE_NAME, 'brand', $this->string()->null()->comment('Бренд'));
- }
-
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropColumn(self::TABLE_NAME, 'product_type');
- $this->dropColumn(self::TABLE_NAME, 'country_of_origin');
- $this->dropColumn(self::TABLE_NAME, 'manufacturer');
- $this->dropColumn(self::TABLE_NAME, 'brand');
- }
-
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
-
- }
-
- public function down()
- {
- echo "m241126_152940_add_fields_to_products_1c cannot be reverted.\n";
-
- return false;
- }
- */
-}