| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace addons\Coupon\console\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%coupon_store_goods_relate}}`.
- */
- class M241204031643CreateCouponStoreGoodsRelateTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_addons_coupon_store_goods_relate` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `coupon_id` int(11) NOT NULL COMMENT '优惠券id',
- `goods_id` int(11) NOT NULL COMMENT '门店商品id',
- `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='门店商品优惠券表';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|