| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M231229104415ReserveField
- */
- class M231229104415ReserveField extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("ALTER TABLE `qimall_order_refund` ADD COLUMN `goods_type` TINYINT NOT NULL DEFAULT 1 COMMENT '商品类型' AFTER `updated_at`;");
- $this->execute("INSERT INTO `qimall_link_category` (`name`, `title`, `pid`, `is_list`, `remark`, `status`, `created_at`, `updated_at`) VALUES ('cate_goods', '类目商品', 7, 1, NULL, 1, 1634124003, 1634124003);");
- $this->execute("ALTER TABLE `qimall_goods` ADD COLUMN `comment_score` DECIMAL(5,2) NOT NULL DEFAULT '5' COMMENT '评分' AFTER `is_show`;");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M231229104415ReserveField cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M231229104415ReserveField cannot be reverted.\n";
- return false;
- }
- */
- }
|