Version20150819095300.php 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 Version20150819095300
  8. *
  9. * @package Application\Migrations\Schema\V11010
  10. */
  11. class Version20150819095300 extends AbstractMigrationChamilo
  12. {
  13. /**
  14. * @param Schema $schema
  15. */
  16. public function up(Schema $schema)
  17. {
  18. $skillTable = $schema->getTable('skill');
  19. $skillTable->addColumn(
  20. 'status',
  21. \Doctrine\DBAL\Types\Type::INTEGER,
  22. ['default' => 1]
  23. );
  24. $skillTable->addColumn(
  25. 'updated_at',
  26. \Doctrine\DBAL\Types\Type::DATETIME
  27. );
  28. }
  29. /**
  30. * @param Schema $schema
  31. */
  32. public function down(Schema $schema)
  33. {
  34. $skillTable = $schema->getTable('skill');
  35. $skillTable->dropColumn('status');
  36. $skillTable->dropColumn('updated_at');
  37. }
  38. }