M220830063809InsterQimallGlobalVarMap.php 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace addons\Seed\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M220830063809InsterQimallGlobalVarMap
  6. */
  7. class M220830063809InsterQimallGlobalVarMap extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $insert_data = [
  15. ['Seed', '种子金', 'IncomeMap', 1, 1, 1661841988, 1661841988],
  16. ['Seed', '种子金', 'FromTypeMap', 1, 1, 1661841988, 1661841988],
  17. ['collect', '提现', 'CapitalTypeMap', 0, 1, 1661841988, 1661841988]
  18. ];
  19. $field = ['name', 'title', 'type', 'is_addons', 'status', 'created_at', 'updated_at'];
  20. $this->batchInsert('{{%global_var_map}}', $field, $insert_data);
  21. return true;
  22. }
  23. /*
  24. // Use up()/down() to run migration code without a transaction.
  25. public function up()
  26. {
  27. }
  28. public function down()
  29. {
  30. echo "M220830063809InsterQimallGlobalVarMap cannot be reverted.\n";
  31. return false;
  32. }
  33. */
  34. }