| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%order_achievement_goods}}`.
- */
- class M240826014827CreateOrderAchievementGoodsTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_order_achievement_goods` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
- `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
- `order_details_ids` json DEFAULT NULL COMMENT '订单详情id',
- `goods_ids` json DEFAULT NULL COMMENT '订单满足业绩的商品',
- `created_at` int(10) unsigned NOT NULL DEFAULT '0',
- `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- KEY `order_id` (`order_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付时配置的业绩商品';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|