Version20150527101600.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. namespace Application\Migrations\Schema\V110;
  4. use Application\Migrations\AbstractMigrationChamilo;
  5. use Doctrine\DBAL\Schema\Schema;
  6. /**
  7. * Class Version20150527120703
  8. * LP autolunch -> autolaunch
  9. * @package Application\Migrations\Schema\V11010
  10. */
  11. class Version20150527101600 extends AbstractMigrationChamilo
  12. {
  13. /**
  14. * @param Schema $schema
  15. */
  16. public function up(Schema $schema)
  17. {
  18. $this->addSettingCurrent(
  19. 'gamification_mode',
  20. '',
  21. 'radio',
  22. 'Platform',
  23. 0,
  24. 'GamificationModeTitle',
  25. 'GamificationModeComment',
  26. null,
  27. '',
  28. 1,
  29. true,
  30. false,
  31. [
  32. [
  33. 'value' => 1,
  34. 'text' => 'Yes'
  35. ],
  36. [
  37. 'value' => 0,
  38. 'text' => 'No'
  39. ]
  40. ]
  41. );
  42. }
  43. /**
  44. * @param Schema $schema
  45. */
  46. public function down(Schema $schema)
  47. {
  48. $this->addSql("DELETE FROM settings_options WHERE variable = 'gamification_mode'");
  49. $this->addSql("DELETE FROM settings_current WHERE variable = 'gamification_mode'");
  50. }
  51. }