| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Exception;
- use yii\db\Migration;
- /**
- * Class M230127181906MembersCardAdd
- */
- class M230127181906MembersCardAdd extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- /*亲友卡新增*/
- $sql = "ALTER TABLE `qimall_addons_store_order_marketing` ADD COLUMN `user_card_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户会员卡id map';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230127181906MembersCardAdd cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230127181906MembersCardAdd cannot be reverted.\n";
- return false;
- }
- */
- }
|