Version20150706135000.php 886 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. * GradebookCategory changes
  8. */
  9. class Version20150706135000 extends AbstractMigrationChamilo
  10. {
  11. /**
  12. * @param Schema $schema
  13. */
  14. public function up(Schema $schema)
  15. {
  16. $gradebookCategory = $schema->getTable('gradebook_category');
  17. $isRequirement = $gradebookCategory->addColumn(
  18. 'is_requirement',
  19. \Doctrine\DBAL\Types\Type::BOOLEAN
  20. );
  21. $isRequirement->setNotnull(true)->setDefault(false);
  22. }
  23. /**
  24. * @param Schema $schema
  25. */
  26. public function down(Schema $schema)
  27. {
  28. $gradebookCategory = $schema->getTable('gradebook_category');
  29. $gradebookCategory->dropColumn('is_requirement');
  30. }
  31. }