Prechádzať zdrojové kódy

Se elimina migración y se pasa el comando a composer.json que importa templates docsis

Guillermo Espinoza 7 rokov pred
rodič
commit
87fe8c05a0

+ 0 - 47
app/DoctrineMigrations/Version20180117141124.php

@@ -1,47 +0,0 @@
-<?php
-
-namespace Application\Migrations;
-
-use Doctrine\DBAL\Migrations\AbstractMigration;
-use Doctrine\DBAL\Schema\Schema;
-use Symfony\Component\DependencyInjection\ContainerAwareInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\Process\Process;
-
-/**
- * Migración que corre el comando init:templates:docsis para cargar los modelos y template docsis
- */
-class Version20180117141124 extends AbstractMigration implements ContainerAwareInterface
-{
-
-    /**
-     * @var ContainerInterface
-     */
-    private $container;
-
-    /**
-     * @param ContainerInterface $container
-     */
-    public function setContainer(ContainerInterface $container = null)
-    {
-        $this->container = $container;
-    }
-
-    /**
-     * @param Schema $schema
-     */
-    public function up(Schema $schema)
-    {
-        $consolePath = $this->container->get('kernel')->getRootDir() . '/../bin/console';
-        $process = new Process("{$consolePath} init:templates:docsis");
-        $process->run();
-        $content = $process->getOutput();
-        echo $content;
-    }
-
-    public function down(Schema $schema)
-    {
-
-    }
-
-}

+ 3 - 1
composer.json

@@ -195,6 +195,7 @@
         "doctrine-update": "php bin/console doctrine:schema:update --force",
         "doctrine-migrations": "php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration",
         "auto-increment": "php bin/console baseadmin:autoincrement",
+        "init-template-docsis": "php bin/console init:templates:docsis",
         "post-install-cmd": [
             "@workflows-commands",
             "@symfony-scripts",
@@ -202,7 +203,8 @@
             "@chmod-dir-cache-sessions-logs",
             "@doctrine-update",
             "@auto-increment",
-            "@doctrine-migrations"
+            "@doctrine-migrations",
+            "@init-template-docsis"
         ],
         "post-update-cmd": [
             "@workflows-commands",