| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace addons\ScoreExpansion\console\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%score_expansion_recommend_reward_goods}}`.
- */
- class M250623081811CreateScoreExpansionRecommendRewardGoodsTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_addons_score_expansion_recommend_reward_goods` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
- `goods_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
- `is_alone` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否独立设置',
- `setting` json DEFAULT NULL 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 `goods_id` (`goods_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='参与推荐奖励的商品表';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|