| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250823035353CreateQimallAddonsCloudStockGiveCouponSetting
- */
- class M250823035353CreateQimallAddonsCloudStockGiveCouponSetting extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_addons_cloud_stock_give_coupon_setting` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL COMMENT '商城ID',
- `goods_id` int(11) DEFAULT '0' COMMENT '设置id',
- `level` int(10) DEFAULT '0' COMMENT '等级权重',
- `coupon_setting` text COMMENT '赠送规则',
- `num` int(11) DEFAULT '0' COMMENT '满*赠送',
- `status` tinyint(1) DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `created_at` int(11) NOT NULL DEFAULT '0',
- `updated_at` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `mall_id` (`mall_id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='云库存补货赠送优惠券设置详情'";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250823035353CreateQimallAddonsCloudStockGiveCouponSetting cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250823035353CreateQimallAddonsCloudStockGiveCouponSetting cannot be reverted.\n";
- return false;
- }
- */
- }
|