| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace addons\ScoreExpansion\console\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%score_expansion_recommend_reward_details}}`.
- */
- class M250623100431CreateScoreExpansionRecommendRewardDetailsTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_addons_score_expansion_recommend_reward_details` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0',
- `recommend_reward_order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '推荐奖励订单记录表id',
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发放用户ID',
- `date` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '奖励日期',
- `reward_frozen_score` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '奖励的冻结积分',
- `loop_num` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '第几轮的奖励',
- `current_reward_person_index` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '奖励第几人',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `created_at` int(10) unsigned NOT NULL DEFAULT '0',
- `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- KEY `recommend_reward_order_id` (`recommend_reward_order_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='参与推荐奖励明细表';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|