| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%cloud_stock_agent_cart}}`.
- */
- class M241015024554CreateCloudStockAgentCartTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_addons_cloud_stock_agent_cart` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0',
- `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
- `goods_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品id',
- `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '提交订单后的订单id',
- `num` int(10) 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 `mall_id` (`mall_id`,`user_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代理批量提货购物车';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|