1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace Application\Migrations;
- use Doctrine\DBAL\Schema\Schema;
- use MigrationsBundle\Migrations\MigrationsBase;
- /**
- * Auto-generated Migration: Please modify to your needs!
- */
- class Version20180315124145 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('oltmodel', 'netmiko')) {
- $this->addsql("ALTER TABLE oltmodel ADD netmiko VARCHAR(255) DEFAULT NULL;");
- }
- if (!$this->existFieldInTable('oltmodel_audit', 'netmiko')) {
- $this->addsql("ALTER TABLE oltmodel_audit ADD netmiko VARCHAR(255) DEFAULT NULL;");
- }
- if (!$this->existFieldInTable('olt', 'backups')) {
- $this->addSql("ALTER TABLE olt ADD backups TINYINT(1) DEFAULT '1';");
- }
- if (!$this->existFieldInTable('olt_audit', 'backups')) {
- $this->addSql("ALTER TABLE olt_audit ADD backups TINYINT(1) DEFAULT '1';");
- }
- }
- /**
- * @param Schema $schema
- */
- public function down(Schema $schema)
- {
- // this down() migration is auto-generated, please modify it to your needs
- }
- }
|