Skip to content

Instantly share code, notes, and snippets.

@iamvar
Forked from KaiCMueller/doctrine_migrations.yaml
Created January 25, 2021 14:47
Show Gist options
  • Save iamvar/1ee30d9b32b44e4fc7dbf52208842293 to your computer and use it in GitHub Desktop.
Save iamvar/1ee30d9b32b44e4fc7dbf52208842293 to your computer and use it in GitHub Desktop.
Doctrine Migrations Template
doctrine_migrations:
dir_name: "%kernel.project_dir%/src/Migrations"
namespace: "App\\Migrations"
custom_template: "%kernel.project_dir%/src/Migrations/migration.tpl"
<?php declare(strict_types = 1);
namespace <namespace>;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version<version> extends AbstractMigration
{
/**
* @param \Doctrine\DBAL\Schema\Schema $schema
*
* @return void
*/
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
<up>
}
/**
* @param \Doctrine\DBAL\Schema\Schema $schema
*
* @return void
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
<down>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment