| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220923063134AddColumnToQimallAddonsAgentCommissionLevelSetting
- */
- class M220923063134AddColumnToQimallAddonsAgentCommissionLevelSetting extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "ALTER TABLE qimall_addons_agent_commission_level_setting add `team_achievement` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '渠道业绩额外奖励';";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220923063134AddColumnToQimallAddonsAgentCommissionLevelSetting cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220923063134AddColumnToQimallAddonsAgentCommissionLevelSetting cannot be reverted.\n";
- return false;
- }
- */
- }
|