Version20160519201900.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 Version20160519201900
  9. * Update the subkeytext of some settings, previously preventing translations
  10. * @package Application\Migrations\Schema\V111
  11. */
  12. class Version20160519201900 extends AbstractMigrationChamilo
  13. {
  14. /**
  15. * @param Schema $schema
  16. * @throws \Doctrine\DBAL\Schema\SchemaException
  17. */
  18. public function up(Schema $schema)
  19. {
  20. $this->addSql("UPDATE settings_current SET subkeytext = 'Name' WHERE variable = 'profile' AND subkey = 'name'");
  21. $this->addSql("UPDATE settings_current SET subkeytext = 'OfficialCode' WHERE variable = 'profile' AND subkey = 'officialcode'");
  22. $this->addSql("UPDATE settings_current SET subkeytext = 'Phone' WHERE variable = 'profile' AND subkey = 'phone'");
  23. }
  24. /**
  25. * @param Schema $schema
  26. */
  27. public function down(Schema $schema)
  28. {
  29. $this->addSql("UPDATE settings_current SET subkeytext = 'name' WHERE variable = 'profile' AND subkey = 'name'");
  30. $this->addSql("UPDATE settings_current SET subkeytext = 'officialcode' WHERE variable = 'profile' AND subkey = 'officialcode'");
  31. $this->addSql("UPDATE settings_current SET subkeytext = 'phone' WHERE variable = 'profile' AND subkey = 'phone'");
  32. }
  33. }