Version20160705190000.php 973 B

123456789101112131415161718192021222324252627282930313233343536
  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 Version20160705190000
  9. * Add accumulate scorm time to c_lp table
  10. * @package Application\Migrations\Schema\V111
  11. */
  12. class Version20160705190000 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("ALTER TABLE c_lp ADD COLUMN accumulate_scorm_time INT NOT NULL DEFAULT 1");
  22. }
  23. /**
  24. * @param Schema $schema
  25. * @throws \Doctrine\DBAL\DBALException
  26. * @throws \Doctrine\DBAL\Schema\SchemaException
  27. */
  28. public function down(Schema $schema)
  29. {
  30. $this->addSql("ALTER TABLE c_lp DROP COLUMN accumulate_scorm_time");
  31. }
  32. }