Version20180321184546.php 955 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Application\Migrations;
  3. use Doctrine\DBAL\Migrations\AbstractMigration;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use MigrationsBundle\Migrations\MigrationsBase;
  6. /**
  7. * Auto-generated Migration: Please modify to your needs!
  8. */
  9. class Version20180321184546 extends MigrationsBase
  10. {
  11. /**
  12. * @param Schema $schema
  13. */
  14. public function up(Schema $schema)
  15. {
  16. // this up() migration is auto-generated, please modify it to your needs
  17. if (!$this->existFieldInTable("nap", "capacity")) {
  18. $this->addSql("ALTER TABLE nap ADD capacity INT NOT NULL;");
  19. }
  20. if (!$this->existFieldInTable("nap_audit", "capacity")) {
  21. $this->addSql("ALTER TABLE nap_audit ADD capacity INT DEFAULT NULL;");
  22. }
  23. }
  24. /**
  25. * @param Schema $schema
  26. */
  27. public function down(Schema $schema)
  28. {
  29. // this down() migration is auto-generated, please modify it to your needs
  30. }
  31. }