123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace Application\Migrations;
- use Doctrine\DBAL\Migrations\AbstractMigration;
- use Doctrine\DBAL\Schema\Schema;
- /**
- * Auto-generated Migration: Please modify to your needs!
- */
- class Version20171019130515 extends AbstractMigration
- {
- /**
- * @param Schema $schema
- */
- public function up(Schema $schema)
- {
- $base = 1;
- $this->addsql("UPDATE nap SET tenancy_id = " . $base . " WHERE isnull(tenancy_id)");
- $this->addsql("UPDATE olt SET tenancy_id = " . $base . " WHERE isnull(tenancy_id)");
- $this->addsql("UPDATE onu SET tenancy_id = " . $base . " WHERE isnull(tenancy_id)");
- $this->addsql("UPDATE profile SET tenancy_id = " . $base . " WHERE isnull(tenancy_id) OR id = 1");
- $this->addsql("UPDATE oltmodel SET tenancy_id = " . $base . " WHERE isnull(tenancy_id) or tenancy_id = 0");
- $this->addsql("UPDATE onumodel SET tenancy_id = " . $base . " WHERE isnull(tenancy_id) or tenancy_id = 0");
- }
- /**
- * @param Schema $schema
- */
- public function down(Schema $schema)
- {
- // this down() migration is auto-generated, please modify it to your needs
- }
- }
|