| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace addons\Achievement\console\migrations;
- use yii\db\Migration;
- /**
- * Class M231124092954AchievementEqualUpdate
- */
- class M231124092954AchievementEqualUpdate extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_achievement_award_log`
- ADD COLUMN `team_equal_first` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '团队一层平级奖励',
- ADD COLUMN `team_equal_second` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '团队二层平级奖励';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M231124092954AchievementEqualUpdate cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M231124092954AchievementEqualUpdate cannot be reverted.\n";
- return false;
- }
- */
- }
|