| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace addons\Area\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230614063500AreaGoodsAgentId
- */
- class M230614063500AreaGoodsAgentId extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("ALTER TABLE `qimall_addons_area_goods`
- ADD COLUMN `agent_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '代理ID' AFTER `goods_id`;");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230614063500AreaGoodsAgentId cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230614063500AreaGoodsAgentId cannot be reverted.\n";
- return false;
- }
- */
- }
|