| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220923063121AddColumnToQimallAddonsAgentLevel
- */
- class M220923063121AddColumnToQimallAddonsAgentLevel extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="ALTER TABLE qimall_addons_agent_level add is_open_equal_settle_type tinyint(1) DEFAULT 0 COMMENT '开启独立平级奖结算';";
- $this->execute($sql);
- $sql = "ALTER TABLE qimall_addons_agent_level add equal_settle_type tinyint(1) DEFAULT 0 COMMENT '平级奖结算方式';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220923063121AddColumnToQimallAddonsAgentLevel cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220923063121AddColumnToQimallAddonsAgentLevel cannot be reverted.\n";
- return false;
- }
- */
- }
|