| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace addons\CloudStock\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250306032007AlterQimallAddonsCloudStockAgentOrder
- */
- class M250306032007AlterQimallAddonsCloudStockAgentOrder extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "
- alter table qimall_addons_cloud_stock_agent_order add `pay_time` bigint(20) DEFAULT '0' COMMENT '支付时间';
- alter table qimall_addons_cloud_stock_agent_order add `payment_type` tinyint(1) DEFAULT '0' COMMENT '支付类型';";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250306032007AlterQimallAddonsCloudStockAgentOrder cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250306032007AlterQimallAddonsCloudStockAgentOrder cannot be reverted.\n";
- return false;
- }
- */
- }
|