Browse Source

Merge branch 'hotfix-create-onu' into 'master'

Fixed migration when i restart a container ftth

See merge request interlink-sa/flowdat3/modules/ftth!161
Jean Sumara Leopoldo 5 năm trước cách đây
mục cha
commit
014c32ce1b
1 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 5
      app/DoctrineMigrations/Version20171019130515.php

+ 4 - 5
app/DoctrineMigrations/Version20171019130515.php

@@ -16,12 +16,11 @@ class Version20171019130515 extends AbstractMigration
     public function up(Schema $schema)
     {
         $base = 1;
-        $initial = 2;
 
-        $this->addsql("UPDATE nap SET tenancy_id = " . $initial . " WHERE isnull(tenancy_id) or tenancy_id = " . $base);
-        $this->addsql("UPDATE olt SET tenancy_id = " . $initial . " WHERE isnull(tenancy_id) or tenancy_id = " . $base);
-        $this->addsql("UPDATE onu SET tenancy_id = " . $initial . " WHERE isnull(tenancy_id) or tenancy_id = " . $base);
-        $this->addsql("UPDATE profile SET tenancy_id = " . $initial . " WHERE isnull(tenancy_id) or tenancy_id = " . $base);
+        $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)");
         $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");
     }