|
@@ -1,46 +0,0 @@
|
|
|
-<?php
|
|
|
-
|
|
|
-namespace Application\Migrations;
|
|
|
-
|
|
|
-use Doctrine\DBAL\Schema\Schema;
|
|
|
-use MigrationsBundle\Migrations\MigrationsBase;
|
|
|
-
|
|
|
-/**
|
|
|
- * Migración que carga los archivos yml del directorio src/
|
|
|
- */
|
|
|
-class Version20180424133417 extends MigrationsBase
|
|
|
-{
|
|
|
-
|
|
|
- /**
|
|
|
- * @param Schema $schema
|
|
|
- */
|
|
|
- public function up(Schema $schema)
|
|
|
- {
|
|
|
- // migrations a borrar
|
|
|
- $migrationVersions = [
|
|
|
- '20170720182513',
|
|
|
- '20171205180407',
|
|
|
- '20171205183401',
|
|
|
- '20171219120324',
|
|
|
- '20180111183322',
|
|
|
- '20180124175322',
|
|
|
- '20180410130145',
|
|
|
- '20180424133417'
|
|
|
- ];
|
|
|
-
|
|
|
- foreach ($migrationVersions as $version) {
|
|
|
- $this->addSql("DELETE FROM migration_versions WHERE version = {$version};");
|
|
|
- }
|
|
|
-
|
|
|
- // cargo todos los archivos que esten en src/
|
|
|
- // deben tener extensión yml
|
|
|
- $directory = __DIR__ . DIRECTORY_SEPARATOR . 'src';
|
|
|
- $migrations = scandir($directory);
|
|
|
- foreach ($migrations as $migration) {
|
|
|
- $this->executeYaml($directory, $migration);
|
|
|
- $this->showResult();
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-}
|