| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250818062602AddDrugGenericNameToGoodsExtra
- */
- class M250818062602AddDrugGenericNameToGoodsExtra extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_goods_extra`
- ADD COLUMN `drug_generic_name` varchar(120) NOT NULL DEFAULT '' COMMENT '药品通用名称';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250818062602AddDrugGenericNameToGoodsExtra cannot be reverted.\n";
- return false;
- }
- */
- }
|