| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220924092554InsertQimallGlobalVarMap
- */
- class M220924092554InsertQimallGlobalVarMap extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "
- INSERT INTO `qimall_global_var_map`(`name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES
- ('Agent', '渠道分红', 'FromTypeMap', 1, 1, 1654569888, 1654569888);
- ";
- $this->execute($sql);
- $sql = "
- INSERT INTO `qimall_global_var_map`( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`)
- VALUES ( 'team_achievement_extra', '渠道业绩额外奖励', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);
- ";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220924092554InsertQimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220924092554InsertQimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- */
- }
|