Version20160701110000.php 1.6 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 Version20160701110000
  9. * Add option to remove splash screen on course creation
  10. * @package Application\Migrations\Schema\V111
  11. */
  12. class Version20160701110000 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 ('course_creation_splash_screen',NULL,'radio','Course','true','CourseCreationSplashScreenTitle','CourseCreationSplashScreenComment','',NULL, 1)");
  22. $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','true','Yes') ");
  23. $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','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 = 'course_creation_splash_screen'");
  33. $this->addSql("DELETE FROM settings_options WHERE variable = 'course_creation_splash_screen'");
  34. }
  35. }