Version20160713180000.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. /**
  7. * Class Version20160713180000
  8. * Add option to use SVG icons instead of their PNG version
  9. * @package Application\Migrations\Schema\V111
  10. */
  11. class Version20160713180000 extends AbstractMigrationChamilo
  12. {
  13. /**
  14. * @param Schema $schema
  15. * @throws \Doctrine\DBAL\DBALException
  16. * @throws \Doctrine\DBAL\Schema\SchemaException
  17. */
  18. public function up(Schema $schema)
  19. {
  20. $this->addSql("DELETE FROM settings_current WHERE variable = 'allow_browser_sniffer'");
  21. $this->addSql("DELETE FROM settings_options WHERE variable = 'allow_browser_sniffer'");
  22. }
  23. /**
  24. * @param Schema $schema
  25. * @throws \Doctrine\DBAL\DBALException
  26. * @throws \Doctrine\DBAL\Schema\SchemaException
  27. */
  28. public function down(Schema $schema)
  29. {
  30. $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_browser_sniffer', NULL, 'radio', 'Tuning', 'false', 'AllowBrowserSnifferTitle','AllowBrowserSnifferComment',NULL,NULL, 0)");
  31. $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_browser_sniffer','true','Yes') ");
  32. $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_browser_sniffer','false','No') ");
  33. }
  34. }