| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M221226065640InsertIntoQimallGlobalVarMap
- */
- class M221226065640InsertIntoQimallGlobalVarMap 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 ( 'extra_equal_1', '额外平1级', 'CapitalTypeMap', 0, 1, 0, 0);
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'extra_equal_2', '额外平2级', 'CapitalTypeMap', 0, 1, 0, 0);
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'drainage_subsidy', '引流补贴', 'CapitalTypeMap', 0, 1, 0, 0);
- INSERT INTO `qimall_global_var_map` ( `name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ( 'team_subsidy', '渠道补贴', 'CapitalTypeMap', 0, 1, 0, 0);
- ";
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M221226065640InsertIntoQimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M221226065640InsertIntoQimallGlobalVarMap cannot be reverted.\n";
- return false;
- }
- */
- }
|