123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace Application\Migrations;
- use Doctrine\DBAL\Migrations\AbstractMigration;
- use Doctrine\DBAL\Schema\Schema;
- use MigrationsBundle\Migrations\MigrationsBase;
- /**
- * Auto-generated Migration: Please modify to your needs!
- */
- class Version20180321184546 extends MigrationsBase
- {
- /**
- * @param Schema $schema
- */
- public function up(Schema $schema)
- {
- // this up() migration is auto-generated, please modify it to your needs
- if (!$this->existFieldInTable("nap", "capacity")) {
- $this->addSql("ALTER TABLE nap ADD capacity INT NOT NULL;");
- }
- if (!$this->existFieldInTable("nap_audit", "capacity")) {
- $this->addSql("ALTER TABLE nap_audit ADD capacity INT DEFAULT NULL;");
- }
- }
- /**
- * @param Schema $schema
- */
- public function down(Schema $schema)
- {
- // this down() migration is auto-generated, please modify it to your needs
- }
- }
|