Browse Source

FD3-415 Migration para actions. Se refactorizaron las migrations

Espinoza Guillermo 7 năm trước cách đây
mục cha
commit
eb7f1ff7f7

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 106
app/DoctrineMigrations/Actions20171205180407/inicio.yml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 50
app/DoctrineMigrations/Actions20180111183322/radius.action.yml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 70
app/DoctrineMigrations/Templates20171205183401/inicio.yml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 106
app/DoctrineMigrations/Templates20171219120324/actions.yml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 35
app/DoctrineMigrations/Templates20180221174411/template-action-2018-02-26.yml


+ 0 - 24
app/DoctrineMigrations/Version20170720182513.php

@@ -1,24 +0,0 @@
-<?php
-
-namespace Application\Migrations;
-
-use Doctrine\DBAL\Schema\Schema;
-use MigrationsBundle\Migrations\MigrationsBase;
-
-class Version20170720182513 extends MigrationsBase
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->executeYaml(__DIR__, 'fd3_ftth.yml');
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-    }
-}

+ 0 - 20
app/DoctrineMigrations/Version20171205180407.php

@@ -1,20 +0,0 @@
-<?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 Version20171205180407 extends MigrationsBase
-{
-    public function up(Schema $schema)
-    {
-        $this->executeYaml(__DIR__ . "/Actions20171205180407/", "inicio.yml");
-        $this->showResult();
-    }
-}

+ 0 - 19
app/DoctrineMigrations/Version20171205183401.php

@@ -1,19 +0,0 @@
-<?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 Version20171205183401 extends MigrationsBase
-{
-    public function postUp(Schema $schema)
-    {
-        $this->executeYaml(__DIR__ . "/Templates20171205183401/", "inicio.yml");
-        $this->showResult();
-    }
-}

+ 0 - 31
app/DoctrineMigrations/Version20171219120324.php

@@ -1,31 +0,0 @@
-<?php
-
-namespace Application\Migrations;
-
-use Doctrine\DBAL\Migrations\AbstractMigration;
-use Doctrine\DBAL\Schema\Schema;
-use MigrationsBundle\Migrations\MigrationsBase;
-
-class Version20171219120324 extends MigrationsBase
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        // this up() migration is auto-generated, please modify it to your needs
-	$this->executeYaml(__DIR__ . "/Templates20171219120324/", "actions.yml");
-        $this->showResult();
-
-
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function down(Schema $schema)
-    {
-        // this down() migration is auto-generated, please modify it to your needs
-
-    }
-}

+ 0 - 24
app/DoctrineMigrations/Version20180111183322.php

@@ -1,24 +0,0 @@
-<?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 Version20180111183322 extends MigrationsBase 
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $this->executeYaml(__DIR__ . "/Actions20180111183322/", "radius.action.yml");
-        $this->showResult();
-
-    }
-}

+ 0 - 27
app/DoctrineMigrations/Version20180124175322.php

@@ -1,27 +0,0 @@
-<?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 Version20180124175322 extends MigrationsBase 
-{
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-	    $files = array("action.yml",  "olt_model.yml",  "onu_model.yml",  "template.yml");
-	    foreach($files as $f){
-		$this->executeYaml(__DIR__ . "/Version20180124175322/", $f);
-	    }
-
-        $this->showResult();
-
-    }
-}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 106
app/DoctrineMigrations/Version20180124175322/action.yml


+ 0 - 23
app/DoctrineMigrations/Version20180124175322/olt_model.yml

@@ -1,23 +0,0 @@
-INSERTORUPDATE:
-  oltmodel:
-    - id: "1"
-      name: "FiberHome-AN5516-01"
-      props: "NULL"
-      mark: "FiberHome"
-      library: "OIDSBase"
-      extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/fiberhome/telnet.py\",\r\n\"model\": \"FiberHome-AN5516-01\"\r\n}"
-      tenancy_id: "1"
-    - id: "2"
-      name: "Huawei MA5608T"
-      props: "NULL"
-      mark: "Huawei"
-      library: "OIDSHuaweiV1"
-      extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/huawei/telnet.py\",\r\n\"model\": \"Huawei-MA5608T\"\r\n}"
-      tenancy_id: "2"
-    - id: "3"
-      name: "ZTE C320"
-      props: "NULL"
-      mark: "ZTE"
-      library: "OIDSBase"
-      extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/zte/telnet.py\",\r\n\"model\": \"ZTE-C320\"\r\n}"
-      tenancy_id: "1"

+ 0 - 14
app/DoctrineMigrations/Version20180124175322/onu_model.yml

@@ -1,14 +0,0 @@
-INSERTORUPDATE:
-  onumodel:
-    - id: "1"
-      name: "FiberHome-AN5506-04-b2"
-      extra_data: "{\r\n\"type\" : \"5506-04-b2\",\r\n\"telnet\": \"/tmp\"\r\n}"
-      tenancy_id: "1"
-    - id: "2"
-      name: "Fiberlink HG326UGG"
-      extra_data: "{\r\n\"type\": \"HG260\",\r\n\"telnet\": \"/tmp\"\r\n}"
-      tenancy_id: "1"
-    - id: "3"
-      name: "CDATA-FD600-701GW"
-      extra_data: "{\r\n\"type\": \"CDATA-FD600-701GW\",\r\n\"telnet\": \"/tmp\"\r\n}"
-      tenancy_id: "1"

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 74
app/DoctrineMigrations/Version20180124175322/template.yml


+ 41 - 0
app/DoctrineMigrations/Version20180424133417.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace Application\Migrations;
+
+use MigrationsBundle\Migrations\MigrationsBase;
+use Doctrine\DBAL\Schema\Schema;
+
+/**
+ *
+ */
+class Version20180424133417 extends MigrationsBase
+{
+    /**
+     * @param Schema $schema
+     */
+    public function up(Schema $schema)
+    {
+        // migrations a borrar
+        $migrationVersions = [
+            '20170720182513',
+            '20171205180407',
+            '20171205183401',
+            '20171219120324',
+            '20180111183322',
+            '20180124175322',
+        ];
+
+        foreach ($migrationVersions as $version) {
+            $this->addSql("DELETE FROM migration_versions WHERE version = {$version};");
+        }
+
+        $directory = __DIR__ . DIRECTORY_SEPARATOR . 'src';
+        $migrations = scandir($directory);
+        foreach ($migrations as $migration) {
+            $this->executeYaml($directory, $migration);
+            $this->showResult();
+        }
+
+    }
+
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 165
app/DoctrineMigrations/fd3_ftth.yml


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 146 - 0
app/DoctrineMigrations/src/action.yml


+ 26 - 0
app/DoctrineMigrations/src/oltmodel.yml

@@ -0,0 +1,26 @@
+insertorupdate:
+    oltmodel:
+        -
+          id: 1
+          name: "FiberHome-AN5516-01"
+          props: "NULL"
+          mark: "FiberHome"
+          library: "OIDSBase"
+          extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/fiberhome/telnet.py\",\r\n\"model\": \"FiberHome-AN5516-01\"\r\n}"
+          tenancy_id: 1
+        -
+          id: 2
+          name: "Huawei MA5608T"
+          props: "NULL"
+          mark: "Huawei"
+          library: "OIDSHuaweiV1"
+          extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/huawei/telnet.py\",\r\n\"model\": \"Huawei-MA5608T\",\r\n\"auto-create-service-ports\" : true\r\n}"
+          tenancy_id: 1
+        -
+          id: 3
+          name: "ZTE C320"
+          props: "NULL"
+          mark: "ZTE"
+          library: "OIDSBase"
+          extra_data: "{\r\n\"telnet_cmd\": \"/usr/bin/zte/telnet.py\",\r\n\"model\": \"ZTE-C320\"\r\n}"
+          tenancy_id: 1

+ 17 - 0
app/DoctrineMigrations/src/onumodel.yml

@@ -0,0 +1,17 @@
+insertorupdate:
+    onumodel:
+        -
+          id: 1
+          name: "FiberHome-AN5506-04-b2"
+          extra_data: "{\r\n\"type\" : \"5506-04-b2\",\r\n\"telnet\": \"/tmp\"\r\n}"
+          tenancy_id: 1
+        -
+          id: 2
+          name: "Fiberlink HG326UGG"
+          extra_data: "{\r\n\"type\": \"HG260\",\r\n\"telnet\": \"/tmp\"\r\n}"
+          tenancy_id: 1
+        -
+          id: 3
+          name: "CDATA-FD600-701GW"
+          extra_data: "{\r\n\"type\": \"CDATA-FD600-701GW\",\r\n\"telnet\": \"/tmp\"\r\n}"
+          tenancy_id: 1

+ 8 - 0
app/DoctrineMigrations/src/profile.yml

@@ -0,0 +1,8 @@
+insertorupdate:
+    profile:
+        -
+          id: 1
+          name: "Base"
+          upload: 1024000
+          download: 3072000
+          tenancy_id: 1

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 92 - 0
app/DoctrineMigrations/src/template.yml


+ 30 - 0
app/DoctrineMigrations/src/workflow.yml

@@ -0,0 +1,30 @@
+insertorupdate:
+    workflow:
+        -
+          id: 1
+          name: "olt_workflow"
+          type: "state_machine"
+          marking_type: "single_state"
+          marking_name: "currentState"
+          description: "WorkFlow Activo / Desactivo"
+          template: "initial_place: disabled\r\nplaces:\r\n  - enabled\r\n  - disabled\r\ntransitions:\r\n  disable:\r\n    from: enabled\r\n    to: disabled\r\n  enable:\r\n    from: disabled\r\n    to: enabled"
+          created: "2017-04-22 19:10:24"
+          updated: "2017-04-22 19:48:32"
+          tenancy_id: 1
+          enable: 1
+          support: "a:1:{i:0;s:21:\"FTTHBundle\\Entity\\OLT\";}"
+          owner: 1
+        -
+          id: 2
+          name: "onu_workflow"
+          type: "state_machine"
+          marking_type: "single_state"
+          marking_name: "currentState"
+          description: "onu workflow"
+          template: "initial_place: active\r\nplaces:\r\n  - active\r\n  - disable\r\ntransitions:\r\n  add_config:\r\n    from: active\r\n    to: active\r\n  disable:\r\n    from: active\r\n    to: disable\r\n  active:\r\n    from: disable\r\n    to: active"
+          created: "2017-04-27 11:35:07"
+          updated: "2017-04-27 20:01:43"
+          tenancy_id: 1
+          enable: 1
+          support: "a:1:{i:0;s:21:\"FTTHBundle\\Entity\\ONU\";}"
+          owner: 1