Version20160712150000.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. namespace Application\Migrations\Schema\V111;
  4. use Application\Migrations\AbstractMigrationChamilo;
  5. use Doctrine\DBAL\Schema\Schema;
  6. use Doctrine\DBAL\Types\Type;
  7. /**
  8. * Class Version20160712150000
  9. * Add option to use SVG icons instead of their PNG version
  10. * @package Application\Migrations\Schema\V111
  11. */
  12. class Version20160712150000 extends AbstractMigrationChamilo
  13. {
  14. /**
  15. * @param Schema $schema
  16. * @throws \Doctrine\DBAL\DBALException
  17. * @throws \Doctrine\DBAL\Schema\SchemaException
  18. */
  19. public function up(Schema $schema)
  20. {
  21. $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('icons_mode_svg', NULL, 'radio', 'Tuning', 'false', 'IconsModeSVGTitle','IconsModeSVGComment','',NULL, 1)");
  22. $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('icons_mode_svg','true','Yes') ");
  23. $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('icons_mode_svg','false','No') ");
  24. }
  25. /**
  26. * @param Schema $schema
  27. * @throws \Doctrine\DBAL\DBALException
  28. * @throws \Doctrine\DBAL\Schema\SchemaException
  29. */
  30. public function down(Schema $schema)
  31. {
  32. $this->addSql("DELETE FROM settings_current WHERE variable = 'icons_mode_svg'");
  33. $this->addSql("DELETE FROM settings_options WHERE variable = 'icons_mode_svg'");
  34. }
  35. }