Version20150803171220.php 991 B

123456789101112131415161718192021222324252627282930313233343536
  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 Version20150803171220
  8. *
  9. * @package Application\Migrations\Schema\V110
  10. */
  11. class Version20150803171220 extends AbstractMigrationChamilo
  12. {
  13. /**
  14. * @param Schema $schema
  15. */
  16. public function up(Schema $schema)
  17. {
  18. $this->addSql('UPDATE user SET username_canonical = username');
  19. $this->addSql('ALTER TABLE user ADD confirmation_token VARCHAR(255) NULL');
  20. $this->addSql('ALTER TABLE user ADD password_requested_at DATETIME DEFAULT NULL');
  21. $schema->renameTable('track_e_exercices', 'track_e_exercises');
  22. }
  23. /**
  24. * @param Schema $schema
  25. */
  26. public function down(Schema $schema)
  27. {
  28. $this->addSql('ALTER TABLE user DROP confirmation_token');
  29. $this->addSql('ALTER TABLE user DROP password_requested_at');
  30. }
  31. }