| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250117094321ChackItemTradeType
- */
- class M250117094321ChackItemTradeType extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $res = \Yii::$app->db->schema->getTableSchema("qimall_payment_trade_item", true);
- if (!$res->getColumn('trade_type')) {
- $sql = "ALTER TABLE `qimall_payment_trade_item` ADD COLUMN `trade_type` varchar(100) NOT NULL DEFAULT '' COMMENT '聚合支付具体的支付方式(如汇聚-微信,汇聚-支付宝)'";
- $this->execute($sql);
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250117094321ChackItemTradeType cannot be reverted.\n";
- return false;
- }
- }
|