123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace Application\Migrations;
- use MigrationsBundle\Migrations\MigrationsBase;
- use Doctrine\DBAL\Schema\Schema;
- /**
- * Migration para cargar los archivos .yml del directorio app/DoctrineMigrations/src
- */
- class Version20180522132838 extends MigrationsBase
- {
- /**
- * @param Schema $schema
- */
- public function up(Schema $schema)
- {
- // 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();
- }
- }
- /**
- * @param Schema $schema
- */
- public function down(Schema $schema)
- {
- // this down() migration is auto-generated, please modify it to your needs
- }
- }
|