| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace addons\Rebate\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240517034738CreateRebateVirtualOrderLog
- */
- class M240517034738CreateRebateVirtualOrderLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<CREATETABLE
- CREATE TABLE `qimall_addons_rebate_virtual_order_log` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '生成虚拟订单的用户id',
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商城id',
- `user_parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '虚拟订单用户的父id',
- `rebate_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '推三返一活动id qimall_addons_rebate表',
- `rebate_buy_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '推三返一活动用户购买表id qimall_addons_rebate_buy表',
- `created_at` bigint(20) unsigned NOT NULL DEFAULT '0',
- `updated_at` bigint(20) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='推三返一生成虚拟订单记录表';
- CREATETABLE;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240517034738CreateRebateVirtualOrderLog cannot be reverted.\n";
- return false;
- }
- */
- }
|