| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- *
- * Class M240429131101AddLimitPaymentColumnToQimallPaymentTrade
- */
- class M240429131101AddLimitPaymentColumnToQimallPaymentTrade extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "ALTER TABLE `qimall_payment_trade` ADD COLUMN `limit_payment` longtext NULL COMMENT '限制支付方式'";
- $this->execute($sql);
- $sql = "ALTER TABLE `qimall_goods` ADD COLUMN `is_pay_limit` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否限制支付方式'";
- $this->execute($sql);
- $sql = "ALTER TABLE `qimall_goods` ADD COLUMN `pay_limit` longtext NULL COMMENT '限制的支付方式'";
- $this->execute($sql);
- }catch (\Exception $e){
- }
-
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240429131101AddLimitPaymentColumnToQimallPaymentTrade cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220907030905AddVideoUrlColumnFirstFrameColumnWatchTimesToQimallAddonsStoreCoupon cannot be reverted.\n";
- return false;
- }
- */
- }
|