| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace addons\OperatingNote\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220902065257InsterQimalGlobalVarMap
- */
- class M220902065257InsterQimalGlobalVarMap 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 ";
- $sql .= "('OperatingNote', '运营笔记', 'IncomeMap', 1, 1, 1654569888, 1654569888),";
- $sql .= "('OperatingNote', '运营笔记', 'FromTypeMap', 1, 1, 1654569888, 1654569888),";
- $sql .= "('operating_note_share', '运营笔记分享奖励', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888),";
- $sql .= "('operating_note_view', '运营笔记浏览奖励', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888),";
- $sql .= "('operating_note_buy', '运营笔记购买', 'CapitalTypeMap', 0, 1, 1654569888, 1654569888);";
- $this->execute($sql);
- }catch (\Exception $e){}
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220902065257InsterQimalGlobalVarMap cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220902065257InsterQimalGlobalVarMap cannot be reverted.\n";
- return false;
- }
- */
- }
|