Version20170608164500.php 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 Version20170608164500
  9. *
  10. * Fix c_quiz_question changing data type of type field to integer
  11. *
  12. * @package Application\Migrations\Schema\V111
  13. */
  14. class Version20170608164500 extends AbstractMigrationChamilo
  15. {
  16. /**
  17. * @param Schema $schema
  18. */
  19. public function up(Schema $schema)
  20. {
  21. error_log('Version20170608164500');
  22. $schema
  23. ->getTable('c_quiz_question')
  24. ->getColumn('type')
  25. ->setType(Type::getType(Type::INTEGER));
  26. }
  27. /**
  28. * @param Schema $schema
  29. */
  30. public function down(Schema $schema)
  31. {
  32. $schema
  33. ->getTable('c_quiz_question')
  34. ->getColumn('type')
  35. ->setType(Type::getType(Type::BOOLEAN));
  36. }
  37. }