| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250526065423AlterQimallFreeShippingRules
- */
- class M250526065423AlterQimallFreeShippingRules extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
-
- $sql = "ALTER TABLE `qimall_free_shipping_rules`
- ADD COLUMN `num` int(11) NOT NULL DEFAULT 0 COMMENT '商品件数',
- ADD COLUMN `rule_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '包邮规则类型(1:满足其一即可,2:两个同时满足)';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250526065423AlterQimallFreeShippingRules cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250526065423AlterQimallFreeShippingRules cannot be reverted.\n";
- return false;
- }
- */
- }
|