Version20160706145000.php 1.1 KB

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 Version20160706145000
  9. * Add tag extra field for skills
  10. * @package Application\Migrations\Schema\V111
  11. */
  12. class Version20160706145000 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("INSERT INTO extra_field (extra_field_type, field_type, variable, display_text, visible, changeable, created_at) VALUES (8, 10, 'tags', 'Tags', 1, 1, NOW())");
  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("DELETE FROM extra_field WHERE extra_field_type = 8 AND field_type = 10 AND variable = 'tags'");
  31. }
  32. }