فهرست منبع

Merged in FD3-460 (pull request #5)

FD3-460 se quitó campo opcode de HostType. Migración para hostType cablemodem
Guillermo Espinoza 7 سال پیش
والد
کامیت
fb36bba778

+ 24 - 0
app/DoctrineMigrations/Version20180126150719.php

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

+ 5 - 0
app/DoctrineMigrations/Version20180126150719.yml

@@ -0,0 +1,5 @@
+INSERTORUPDATE:
+    host_type:
+        - id: 1
+          name: "Cablemodem"
+          shortname: "cablemodem"

+ 0 - 4
src/IPv4Bundle/Admin/HostTypeAdmin.php

@@ -18,7 +18,6 @@ class HostTypeAdmin extends BaseAdmin
         $datagridMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
         ;
     }
 
@@ -30,7 +29,6 @@ class HostTypeAdmin extends BaseAdmin
         $listMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
             ->add('_action', null, array(
                 'actions' => array(
                     'show' => array(),
@@ -49,7 +47,6 @@ class HostTypeAdmin extends BaseAdmin
         $formMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
         ;
     }
 
@@ -61,7 +58,6 @@ class HostTypeAdmin extends BaseAdmin
         $showMapper
             ->add('name')
             ->add('shortname')
-            ->add('opcode')
         ;
     }
 }

+ 0 - 7
src/IPv4Bundle/Entity/HostType.php

@@ -43,13 +43,6 @@ class HostType implements PreRemoveInterface
      */
     protected $shortname;
 
-    /**
-     * @var string $opcode
-     *
-     * @ORM\Column(type="string", length=100, unique=true)
-     */
-    protected $opcode;
-
 
     /**
      * @ORM\OneToMany(targetEntity="Host", mappedBy="hostType")

+ 2 - 2
src/IPv4Bundle/Form/HostTypeType.php

@@ -13,9 +13,9 @@ class HostTypeType extends AbstractType
      */
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
-        $builder->add('name')->add('shortname')->add('opcode');
+        $builder->add('name')->add('shortname');
     }
-    
+
     /**
      * {@inheritdoc}
      */

+ 0 - 4
src/IPv4Bundle/Resources/translations/IPv4Bundle.es.yml

@@ -12,7 +12,6 @@ form:
     label_host_type: Tipo de Host
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_sub_net: Subred
@@ -30,7 +29,6 @@ list:
     label__action: Acciones
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_sub_net: Subred
@@ -47,7 +45,6 @@ show:
     label_host_type: Tipo de Host
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_sub_net: Subred
@@ -62,7 +59,6 @@ filter:
     label_mac: Mac
     label_name: Nombre
     label_shortname: Nombre corto
-    label_opcode: Opcode
     label_first_ip: Primer IP
     label_last_ip: Última IP
     label_priority: Prioridad